BoringSecretHunter 1.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. boringsecrethunter-1.2.1/.dockerignore +13 -0
  2. boringsecrethunter-1.2.1/.github/FUNDING.yml +2 -0
  3. boringsecrethunter-1.2.1/.github/workflows/docker.yml +67 -0
  4. boringsecrethunter-1.2.1/.github/workflows/lint.yml +31 -0
  5. boringsecrethunter-1.2.1/.github/workflows/publish.yml +62 -0
  6. boringsecrethunter-1.2.1/.github/workflows/test.yml +31 -0
  7. boringsecrethunter-1.2.1/.github/workflows/version-check.yml +53 -0
  8. boringsecrethunter-1.2.1/.gitignore +185 -0
  9. boringsecrethunter-1.2.1/BoringSecretHunter.java +1213 -0
  10. boringsecrethunter-1.2.1/Dockerfile +40 -0
  11. boringsecrethunter-1.2.1/LICENSE +21 -0
  12. boringsecrethunter-1.2.1/MinimalAnalysisOption.java +219 -0
  13. boringsecrethunter-1.2.1/PKG-INFO +148 -0
  14. boringsecrethunter-1.2.1/README.md +135 -0
  15. boringsecrethunter-1.2.1/boring_secret_hunter_ghidra.py +81 -0
  16. boringsecrethunter-1.2.1/boring_secret_hunter_jython.py +252 -0
  17. boringsecrethunter-1.2.1/conftest.py +20 -0
  18. boringsecrethunter-1.2.1/custom_log4j.xml +13 -0
  19. boringsecrethunter-1.2.1/findBoringSSLLibsOnAndroid.py +1107 -0
  20. boringsecrethunter-1.2.1/ghidra_analysis.sh +236 -0
  21. boringsecrethunter-1.2.1/ghidra_analysis_jython.sh +29 -0
  22. boringsecrethunter-1.2.1/pyproject.toml +42 -0
  23. boringsecrethunter-1.2.1/scanner.js +74 -0
  24. boringsecrethunter-1.2.1/setup.cfg +4 -0
  25. boringsecrethunter-1.2.1/src/BoringSecretHunter.egg-info/PKG-INFO +148 -0
  26. boringsecrethunter-1.2.1/src/BoringSecretHunter.egg-info/SOURCES.txt +50 -0
  27. boringsecrethunter-1.2.1/src/BoringSecretHunter.egg-info/dependency_links.txt +1 -0
  28. boringsecrethunter-1.2.1/src/BoringSecretHunter.egg-info/entry_points.txt +3 -0
  29. boringsecrethunter-1.2.1/src/BoringSecretHunter.egg-info/top_level.txt +1 -0
  30. boringsecrethunter-1.2.1/src/boring_secret_hunter/__init__.py +40 -0
  31. boringsecrethunter-1.2.1/src/boring_secret_hunter/__main__.py +6 -0
  32. boringsecrethunter-1.2.1/src/boring_secret_hunter/analyzer.py +287 -0
  33. boringsecrethunter-1.2.1/src/boring_secret_hunter/arch_detector.py +118 -0
  34. boringsecrethunter-1.2.1/src/boring_secret_hunter/archive_extractor.py +74 -0
  35. boringsecrethunter-1.2.1/src/boring_secret_hunter/binary_classifier.py +66 -0
  36. boringsecrethunter-1.2.1/src/boring_secret_hunter/cli.py +214 -0
  37. boringsecrethunter-1.2.1/src/boring_secret_hunter/config.py +148 -0
  38. boringsecrethunter-1.2.1/src/boring_secret_hunter/ghidra_runner.py +162 -0
  39. boringsecrethunter-1.2.1/src/boring_secret_hunter/ghidra_scripts/BoringSecretHunter.java +1213 -0
  40. boringsecrethunter-1.2.1/src/boring_secret_hunter/ghidra_scripts/MinimalAnalysisOption.java +219 -0
  41. boringsecrethunter-1.2.1/src/boring_secret_hunter/ghidra_scripts/custom_log4j.xml +13 -0
  42. boringsecrethunter-1.2.1/src/boring_secret_hunter/result.py +57 -0
  43. boringsecrethunter-1.2.1/src/boring_secret_hunter/utils.py +89 -0
  44. boringsecrethunter-1.2.1/test/README.md +113 -0
  45. boringsecrethunter-1.2.1/test/libcronet.132.0.6779.0.so +0 -0
  46. boringsecrethunter-1.2.1/tests/__init__.py +0 -0
  47. boringsecrethunter-1.2.1/tests/conftest.py +28 -0
  48. boringsecrethunter-1.2.1/tests/test_arch_detector.py +72 -0
  49. boringsecrethunter-1.2.1/tests/test_archive_extractor.py +84 -0
  50. boringsecrethunter-1.2.1/tests/test_binary_classifier.py +78 -0
  51. boringsecrethunter-1.2.1/tests/test_integration.py +93 -0
  52. boringsecrethunter-1.2.1/tests/test_library_api.py +219 -0
@@ -0,0 +1,13 @@
1
+ binary/
2
+ results/
3
+ .git/
4
+ __pycache__/
5
+ *.egg-info/
6
+ dist/
7
+ .venv/
8
+ *.bin
9
+ *.ipa
10
+ *.apk
11
+ *.so
12
+ .github/
13
+ tests/
@@ -0,0 +1,2 @@
1
+ github: [monkeywave]
2
+ buy_me_a_coffee: monkeywave
@@ -0,0 +1,67 @@
1
+ name: Docker
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - pyproject.toml
8
+
9
+ permissions:
10
+ packages: write
11
+ contents: read
12
+
13
+ jobs:
14
+ docker:
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Extract version
23
+ id: version
24
+ run: |
25
+ VERSION=$(python3 -c "
26
+ import tomllib, pathlib
27
+ data = tomllib.loads(pathlib.Path('pyproject.toml').read_text())
28
+ print(data['project']['version'])
29
+ ")
30
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
31
+ echo "tag=v$VERSION" >> "$GITHUB_OUTPUT"
32
+
33
+ - name: Check if tag exists
34
+ id: tag_check
35
+ run: |
36
+ if git rev-parse "refs/tags/${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then
37
+ echo "exists=true" >> "$GITHUB_OUTPUT"
38
+ else
39
+ echo "exists=false" >> "$GITHUB_OUTPUT"
40
+ fi
41
+
42
+ - name: Log in to GitHub Container Registry
43
+ if: steps.tag_check.outputs.exists == 'false'
44
+ uses: docker/login-action@v3
45
+ with:
46
+ registry: ghcr.io
47
+ username: ${{ github.actor }}
48
+ password: ${{ secrets.GITHUB_TOKEN }}
49
+
50
+ - name: Docker metadata
51
+ if: steps.tag_check.outputs.exists == 'false'
52
+ id: meta
53
+ uses: docker/metadata-action@v5
54
+ with:
55
+ images: ghcr.io/${{ github.repository }}
56
+ tags: |
57
+ type=raw,value=latest
58
+ type=raw,value=${{ steps.version.outputs.version }}
59
+
60
+ - name: Build and push Docker image
61
+ if: steps.tag_check.outputs.exists == 'false'
62
+ uses: docker/build-push-action@v6
63
+ with:
64
+ context: .
65
+ push: true
66
+ tags: ${{ steps.meta.outputs.tags }}
67
+ labels: ${{ steps.meta.outputs.labels }}
@@ -0,0 +1,31 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.9", "3.11", "3.12"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install ruff
25
+ run: pip install ruff==0.12.7
26
+
27
+ - name: Ruff check
28
+ run: ruff check .
29
+
30
+ - name: Ruff format check
31
+ run: ruff format --check .
@@ -0,0 +1,62 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - pyproject.toml
8
+
9
+ permissions:
10
+ id-token: write
11
+ contents: write
12
+
13
+ jobs:
14
+ publish:
15
+ runs-on: ubuntu-latest
16
+ environment: pypi
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Extract version
29
+ id: version
30
+ run: |
31
+ VERSION=$(python3 -c "
32
+ import tomllib, pathlib
33
+ data = tomllib.loads(pathlib.Path('pyproject.toml').read_text())
34
+ print(data['project']['version'])
35
+ ")
36
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
37
+ echo "tag=v$VERSION" >> "$GITHUB_OUTPUT"
38
+
39
+ - name: Check if tag exists
40
+ id: tag_check
41
+ run: |
42
+ if git rev-parse "refs/tags/${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then
43
+ echo "exists=true" >> "$GITHUB_OUTPUT"
44
+ else
45
+ echo "exists=false" >> "$GITHUB_OUTPUT"
46
+ fi
47
+
48
+ - name: Build package
49
+ if: steps.tag_check.outputs.exists == 'false'
50
+ run: |
51
+ pip install build
52
+ python -m build
53
+
54
+ - name: Publish to PyPI
55
+ if: steps.tag_check.outputs.exists == 'false'
56
+ uses: pypa/gh-action-pypi-publish@release/v1
57
+
58
+ - name: Create git tag
59
+ if: steps.tag_check.outputs.exists == 'false'
60
+ run: |
61
+ git tag "${{ steps.version.outputs.tag }}"
62
+ git push origin "${{ steps.version.outputs.tag }}"
@@ -0,0 +1,31 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.9", "3.11", "3.12"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install package
25
+ run: pip install -e .
26
+
27
+ - name: Install pytest
28
+ run: pip install pytest
29
+
30
+ - name: Run tests
31
+ run: pytest tests/ -v --ignore=tests/test_integration.py
@@ -0,0 +1,53 @@
1
+ name: Version Consistency Check
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ check-versions:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.11"
19
+
20
+ - name: Get version from pyproject.toml
21
+ id: pyproject
22
+ run: |
23
+ VERSION=$(python -c "
24
+ import tomllib
25
+ with open('pyproject.toml', 'rb') as f:
26
+ print(tomllib.load(f)['project']['version'])
27
+ ")
28
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
29
+ echo "pyproject.toml version: $VERSION"
30
+
31
+ - name: Check Java VERSION matches pyproject.toml
32
+ run: |
33
+ JAVA_VERSION=$(grep -oP 'VERSION = "\K[^"]+' BoringSecretHunter.java)
34
+ echo "Java VERSION: $JAVA_VERSION"
35
+ echo "Expected: ${{ steps.pyproject.outputs.version }}"
36
+ if [ "$JAVA_VERSION" != "${{ steps.pyproject.outputs.version }}" ]; then
37
+ echo "::error::Java VERSION ($JAVA_VERSION) does not match pyproject.toml (${{ steps.pyproject.outputs.version }})"
38
+ exit 1
39
+ fi
40
+
41
+ - name: Check Python package __version__ matches pyproject.toml
42
+ run: |
43
+ pip install -e . --quiet
44
+ PY_VERSION=$(python -c "from boring_secret_hunter import __version__; print(__version__)")
45
+ echo "Python __version__: $PY_VERSION"
46
+ echo "Expected: ${{ steps.pyproject.outputs.version }}"
47
+ if [ "$PY_VERSION" != "${{ steps.pyproject.outputs.version }}" ]; then
48
+ echo "::error::Python __version__ ($PY_VERSION) does not match pyproject.toml (${{ steps.pyproject.outputs.version }})"
49
+ exit 1
50
+ fi
51
+
52
+ - name: All versions consistent
53
+ run: echo "All versions match ${{ steps.pyproject.outputs.version }}"
@@ -0,0 +1,185 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # misc stuff
7
+ *.txt
8
+ .DS_Store
9
+ *.apk
10
+ *.oat
11
+ *.js
12
+ *.md
13
+ frida_debug_scan_helper.py
14
+ findElfHeaders.py
15
+ *.bin
16
+ *.ipa
17
+ binary/
18
+ research/
19
+ nonochrome/
20
+
21
+ # ida stuff
22
+ *.id0
23
+ *.id1
24
+ *.id2
25
+ *.nam
26
+ *.til
27
+ *.i64
28
+
29
+ # C extensions
30
+ *.so
31
+
32
+ # Distribution / packaging
33
+ .Python
34
+ build/
35
+ develop-eggs/
36
+ dist/
37
+ downloads/
38
+ eggs/
39
+ .eggs/
40
+ lib/
41
+ lib64/
42
+ parts/
43
+ sdist/
44
+ var/
45
+ wheels/
46
+ share/python-wheels/
47
+ *.egg-info/
48
+ .installed.cfg
49
+ *.egg
50
+ MANIFEST
51
+
52
+ # PyInstaller
53
+ # Usually these files are written by a python script from a template
54
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
55
+ *.manifest
56
+ *.spec
57
+
58
+ # Installer logs
59
+ pip-log.txt
60
+ pip-delete-this-directory.txt
61
+
62
+ # Unit test / coverage reports
63
+ htmlcov/
64
+ .tox/
65
+ .nox/
66
+ .coverage
67
+ .coverage.*
68
+ .cache
69
+ nosetests.xml
70
+ coverage.xml
71
+ *.cover
72
+ *.py,cover
73
+ .hypothesis/
74
+ .pytest_cache/
75
+ cover/
76
+
77
+ # Translations
78
+ *.mo
79
+ *.pot
80
+
81
+ # Django stuff:
82
+ *.log
83
+ local_settings.py
84
+ db.sqlite3
85
+ db.sqlite3-journal
86
+
87
+ # Flask stuff:
88
+ instance/
89
+ .webassets-cache
90
+
91
+ # Scrapy stuff:
92
+ .scrapy
93
+
94
+ # Sphinx documentation
95
+ docs/_build/
96
+
97
+ # PyBuilder
98
+ .pybuilder/
99
+ target/
100
+
101
+ # Jupyter Notebook
102
+ .ipynb_checkpoints
103
+
104
+ # IPython
105
+ profile_default/
106
+ ipython_config.py
107
+
108
+ # pyenv
109
+ # For a library or package, you might want to ignore these files since the code is
110
+ # intended to run in multiple environments; otherwise, check them in:
111
+ # .python-version
112
+
113
+ # pipenv
114
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
115
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
116
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
117
+ # install all needed dependencies.
118
+ #Pipfile.lock
119
+
120
+ # poetry
121
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
122
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
123
+ # commonly ignored for libraries.
124
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
125
+ #poetry.lock
126
+
127
+ # pdm
128
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
129
+ #pdm.lock
130
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
131
+ # in version control.
132
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
133
+ .pdm.toml
134
+ .pdm-python
135
+ .pdm-build/
136
+
137
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
138
+ __pypackages__/
139
+
140
+ # Celery stuff
141
+ celerybeat-schedule
142
+ celerybeat.pid
143
+
144
+ # SageMath parsed files
145
+ *.sage.py
146
+
147
+ # Environments
148
+ .env
149
+ .venv
150
+ env/
151
+ venv/
152
+ ENV/
153
+ env.bak/
154
+ venv.bak/
155
+
156
+ # Spyder project settings
157
+ .spyderproject
158
+ .spyproject
159
+
160
+ # Rope project settings
161
+ .ropeproject
162
+
163
+ # mkdocs documentation
164
+ /site
165
+
166
+ # mypy
167
+ .mypy_cache/
168
+ .dmypy.json
169
+ dmypy.json
170
+
171
+ # Pyre type checker
172
+ .pyre/
173
+
174
+ # pytype static type analyzer
175
+ .pytype/
176
+
177
+ # Cython debug symbols
178
+ cython_debug/
179
+
180
+ # PyCharm
181
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
182
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
183
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
184
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
185
+ #.idea/