python-blocker-security-bundle
Read-only workflow bundle that runs all 31 Python blocker security mining codemods in one pass. Findings are recorded via JSSG metrics in the Codemod CLI run report.
# Python blocker security bundle
Read-only **workflow bundle** that runs all **31 Python blocker security mining codemods** in one pass. Findings are recorded via JSSG `useMetricAtom` as `python_security_finding` metrics in the Codemod CLI run report — **no files are written to the target repo**.
## Metric
All bundled miners share the `python_security_finding` metric:
| Field | Description |
| ------------- | ---------------------------------------------- |
| `rule_id` | Rule identifier (e.g. `pythonsecurity:S2076`) |
| `title` | Rule title |
| `severity` | Always `blocking` |
| `remediation` | Suggested fix |
| `file_path` | Relative path to the Python file |
| `line` | 1-based line number |
| `snippet` | Short matched source excerpt |
| `pattern` | Detector-specific pattern id (when applicable) |
## Bundled miners
| # | Codemod | Rule ID |
| --- | ------------------------------------------------------- | ------------------------ |
| 1 | `python-s2115-secure-db-password-mining` | `python:S2115` |
| 2 | `pythonsecurity-s8701-agentic-cmd-injection-mining` | `pythonsecurity:S8701` |
| 3 | `python-s6333-aws-api-gateway-auth-mining` | `python:S6333` |
| 4 | `python-s6270-aws-public-resource-policy-mining` | `python:S6270` |
| 5 | `python-s6437-hardcoded-credentials-mining` | `python:S6437` |
| 6 | `pythonsecurity-s3649-sql-injection-mining` | `pythonsecurity:S3649` |
| 7 | `pythonsecurity-s5135-deser-injection-mining` | `pythonsecurity:S5135` |
| 8 | `pythonsecurity-s5334-dynamic-code-injection-mining` | `pythonsecurity:S5334` |
| 9 | `pythonsecurity-s5131-reflected-xss-mining` | `pythonsecurity:S5131` |
| 10 | `pythonsecurity-s6096-zip-slip-mining` | `pythonsecurity:S6096` |
| 11 | `python-s8389-fastapi-file-upload-form-mining` | `python:S8389` |
| 12 | `python-s8375-flask-preprocess-request-mining` | `python:S8375` |
| 13 | `python-s8374-flask-cbv-decorators-mining` | `python:S8374` |
| 14 | `python-s6779-flask-secret-key-mining` | `python:S6779` |
| 15 | `python-s5439-html-autoescape-disabled-mining` | `python:S5439` |
| 16 | `pythonsecurity-s5146-open-redirect-mining` | `pythonsecurity:S5146` |
| 17 | `pythonsecurity-s6839-response-splitting-mining` | `pythonsecurity:S6839` |
| 18 | `pythonsecurity-s2083-path-injection-mining` | `pythonsecurity:S2083` |
| 19 | `python-s6781-jwt-secret-disclosed-mining` | `python:S6781` |
| 20 | `pythonsecurity-s2078-ldap-injection-mining` | `pythonsecurity:S2078` |
| 21 | `python-s7625-aws-long-term-keys-mining` | `python:S7625` |
| 22 | `pythonsecurity-s5147-nosql-injection-mining` | `pythonsecurity:S5147` |
| 23 | `pythonsecurity-s2076-command-injection-mining` | `pythonsecurity:S2076` |
| 24 | `python-s6302-policy-all-privileges-mining` | `python:S6302` |
| 25 | `python-s6265-s3-public-access-mining` | `python:S6265` |
| 26 | `python-s6418-hardcoded-secrets-mining` | `python:S6418` |
| 27 | `pythonenterprise-s8435-sensitive-url-query-mining` | `pythonenterprise:S8435` |
| 28 | `pythonsecurity-s5496-ssti-mining` | `pythonsecurity:S5496` |
| 29 | `python-s8392-bind-all-interfaces-mining` | `python:S8392` |
| 30 | `python-s2755-xxe-mining` | `python:S2755` |
| 31 | `pythonsecurity-s2091-xpath-injection-mining` | `pythonsecurity:S2091` |
## Usage
Published bundle (after miners are on the registry):
```bash
pnpm dlx codemod@latest workflow run \
-w codemods/python-security-mining/python-blocker-security-bundle/workflow.yaml \
--target /path/to/python/project
```
Local monorepo development:
```bash
pnpm dlx codemod@latest workflow run \
-w codemods/python-security-mining/python-blocker-security-bundle/workflow.local.yaml \
--target /path/to/python/project \
--allow-dirty --no-interactive
```
## Development
```bash
# Validate workflow definitions
pnpm --filter ./codemods/python-security-mining/python-blocker-security-bundle test
# Smoke-run against sample repo
pnpm --filter ./codemods/python-security-mining/python-blocker-security-bundle run test:workflow
# Regenerate workflow steps from rules-manifest.json
node scripts/generate-python-blocker-security-bundle.mjs
```