Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit ca6db13

Browse files
authored
feat/aws-access-auditor (#2)
* feat/aws-auditor: aws auditing code
1 parent b3f4dfb commit ca6db13

30 files changed

+2528
-192
lines changed

.github/workflows/precommit.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: precommit
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches: [main]
8+
9+
permissions:
10+
actions: read
11+
checks: write
12+
contents: read
13+
pull-requests: write
14+
15+
jobs:
16+
pre-commit:
17+
runs-on: ubuntu-24.04
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.11'
23+
- uses: pre-commit/[email protected]

.github/workflows/tests.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: Tests
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
name: Run Tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -e ".[test]"
27+
28+
- name: Run tests
29+
run: |
30+
pytest cpk_lib_python_aws/tests/ -v
31+
32+
33+
test-installation:
34+
name: Test Package Installation
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
- name: Set up Python
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: '3.x'
45+
46+
- name: Install package
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install -e .
50+
51+
- name: Test CLI command
52+
run: |
53+
aws-access-auditor --help

.gitignore

Lines changed: 80 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -1,207 +1,95 @@
1-
# Byte-compiled / optimized / DLL files
2-
__pycache__/
3-
*.py[codz]
41
*$py.class
5-
6-
# C extensions
7-
*.so
8-
9-
# Distribution / packaging
10-
.Python
11-
build/
12-
develop-eggs/
13-
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
wheels/
23-
share/python-wheels/
24-
*.egg-info/
25-
.installed.cfg
2+
*.cover
263
*.egg
27-
MANIFEST
28-
29-
# PyInstaller
30-
# Usually these files are written by a python script from a template
31-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
4+
*.egg-info/
5+
*.egg-info/
6+
*.egg-link
7+
*.installed.cfg
8+
*.log
329
*.manifest
10+
*.mo
11+
*.pot
12+
*.py.cover
13+
*.py[codz]
14+
*.pyc
15+
*.pyd
16+
*.pyo
17+
*.sage.py
18+
*.so
3319
*.spec
34-
35-
# Installer logs
36-
pip-log.txt
37-
pip-delete-this-directory.txt
38-
39-
# Unit test / coverage reports
40-
htmlcov/
41-
.tox/
42-
.nox/
20+
*.swp
21+
.Python
22+
.abstra/
23+
.cache
4324
.coverage
4425
.coverage.*
45-
.cache
46-
nosetests.xml
47-
coverage.xml
48-
*.cover
49-
*.py.cover
26+
.cursorignore
27+
.cursorindexingignore
28+
.dmypy.json
29+
.eggs/
30+
.env
31+
.envrc
5032
.hypothesis/
51-
.pytest_cache/
52-
cover/
53-
54-
# Translations
55-
*.mo
56-
*.pot
57-
58-
# Django stuff:
59-
*.log
60-
local_settings.py
61-
db.sqlite3
62-
db.sqlite3-journal
63-
64-
# Flask stuff:
65-
instance/
66-
.webassets-cache
67-
68-
# Scrapy stuff:
69-
.scrapy
70-
71-
# Sphinx documentation
72-
docs/_build/
73-
74-
# PyBuilder
75-
.pybuilder/
76-
target/
77-
78-
# Jupyter Notebook
33+
.installed.cfg
7934
.ipynb_checkpoints
80-
81-
# IPython
82-
profile_default/
83-
ipython_config.py
84-
85-
# pyenv
86-
# For a library or package, you might want to ignore these files since the code is
87-
# intended to run in multiple environments; otherwise, check them in:
88-
# .python-version
89-
90-
# pipenv
91-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94-
# install all needed dependencies.
95-
#Pipfile.lock
96-
97-
# UV
98-
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99-
# This is especially recommended for binary packages to ensure reproducibility, and is more
100-
# commonly ignored for libraries.
101-
#uv.lock
102-
103-
# poetry
104-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105-
# This is especially recommended for binary packages to ensure reproducibility, and is more
106-
# commonly ignored for libraries.
107-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108-
#poetry.lock
109-
#poetry.toml
110-
111-
# pdm
112-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113-
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114-
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115-
#pdm.lock
116-
#pdm.toml
117-
.pdm-python
35+
.mypy_cache/
36+
.nox/
11837
.pdm-build/
119-
120-
# pixi
121-
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122-
#pixi.lock
123-
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124-
# in the .venv directory. It is recommended not to include this directory in version control.
38+
.pdm-python
12539
.pixi
126-
127-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128-
__pypackages__/
129-
130-
# Celery stuff
131-
celerybeat-schedule
132-
celerybeat.pid
133-
134-
# SageMath parsed files
135-
*.sage.py
136-
137-
# Environments
138-
.env
139-
.envrc
140-
.venv
141-
env/
142-
venv/
143-
ENV/
144-
env.bak/
145-
venv.bak/
146-
147-
# Spyder project settings
40+
.pybuilder/
41+
.pypirc
42+
.pyre/
43+
.pytest_cache/
44+
.pytype/
45+
.ropeproject
46+
.ruff_cache/
47+
.scrapy
14848
.spyderproject
14949
.spyproject
150-
151-
# Rope project settings
152-
.ropeproject
153-
154-
# mkdocs documentation
50+
.tox/
51+
.venv
52+
.vscode/
53+
.webassets-cache
15554
/site
156-
157-
# mypy
158-
.mypy_cache/
159-
.dmypy.json
160-
dmypy.json
161-
162-
# Pyre type checker
163-
.pyre/
164-
165-
# pytype static type analyzer
166-
.pytype/
167-
168-
# Cython debug symbols
55+
ENV/
56+
MANIFEST
57+
__marimo__/
58+
__pycache__/
59+
__pypackages__/
60+
build/
61+
celerybeat-schedule
62+
celerybeat.pid
63+
cover/
64+
coverage.xml
16965
cython_debug/
170-
171-
# PyCharm
172-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174-
# and can be added to the global gitignore or merged into this file. For a more nuclear
175-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
176-
#.idea/
177-
178-
# Abstra
179-
# Abstra is an AI-powered process automation framework.
180-
# Ignore directories containing user credentials, local state, and settings.
181-
# Learn more at https://abstra.io/docs
182-
.abstra/
183-
184-
# Visual Studio Code
185-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186-
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187-
# and can be added to the global gitignore or merged into this file. However, if you prefer,
188-
# you could uncomment the following to ignore the entire vscode folder
189-
# .vscode/
190-
191-
# Ruff stuff:
192-
.ruff_cache/
193-
194-
# PyPI configuration file
195-
.pypirc
196-
197-
# Cursor
198-
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199-
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200-
# refer to https://docs.cursor.com/context/ignore-files
201-
.cursorignore
202-
.cursorindexingignore
203-
204-
# Marimo
205-
marimo/_static/
66+
db.sqlite3
67+
db.sqlite3-journal
68+
develop-eggs/
69+
dist/
70+
dmypy.json
71+
docs/_build/
72+
downloads/
73+
eggs/
74+
env.bak/
75+
env/
76+
htmlcov/
77+
instance/
78+
ipython_config.py
79+
lib/
80+
lib64/
81+
local_settings.py
20682
marimo/_lsp/
207-
__marimo__/
83+
marimo/_static/
84+
nosetests.xml
85+
parts/
86+
pip-delete-this-directory.txt
87+
pip-log.txt
88+
profile_default/
89+
sdist/
90+
share/python-wheels/
91+
target/
92+
var/
93+
venv.bak/
94+
venv/
95+
wheels/

.gitleaks.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
title = "Gitleaks Configuration"
2+
3+
[allowlist]
4+
description = "Allowlist for test files"
5+
paths = [
6+
'''cpk_lib_python_github/.*tests/.*''',
7+
'''.*conftest\.py''',
8+
'''.*test_.*\.py''',
9+
]

0 commit comments

Comments
 (0)