bmsdna-devtools 0.52.0__tar.gz → 0.54.0__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.
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/PKG-INFO +54 -3
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/README.md +52 -2
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/ci_plan_env.py +7 -3
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/cli.py +2 -0
- bmsdna_devtools-0.54.0/bmsdna/devtools/deps/__init__.py +7 -0
- bmsdna_devtools-0.54.0/bmsdna/devtools/deps/advisories.py +500 -0
- bmsdna_devtools-0.54.0/bmsdna/devtools/deps/cli.py +151 -0
- bmsdna_devtools-0.54.0/bmsdna/devtools/deps/lockfiles.py +210 -0
- bmsdna_devtools-0.54.0/bmsdna/devtools/deps/osv.py +137 -0
- bmsdna_devtools-0.54.0/bmsdna/devtools/deps/versions.py +219 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/pipeline.py +14 -6
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/report.py +4 -1
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/sql/04_facts.sql +12 -11
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/sql/05_views.sql +5 -1
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/pyproject.toml +2 -1
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_ci_plan_env.py +41 -0
- bmsdna_devtools-0.54.0/tests/test_cli_deps.py +124 -0
- bmsdna_devtools-0.54.0/tests/test_deps_advisories.py +238 -0
- bmsdna_devtools-0.54.0/tests/test_deps_lockfiles.py +143 -0
- bmsdna_devtools-0.54.0/tests/test_deps_osv.py +92 -0
- bmsdna_devtools-0.54.0/tests/test_deps_versions.py +89 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_usage.py +31 -1
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/uv.lock +3 -1
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/.github/workflows/auto-release.yml +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/.github/workflows/python-publish.yml +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/.github/workflows/python-test.yml +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/.gitignore +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/.python-version +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/__init__.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/_api_dump.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/ado_auth.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/ado_issue.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/agent_mentions.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/api_usage.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/app_service_logs.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/azure_arm.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/azure_auth.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/bdt_config.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/business_user.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/ci_plan.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/cli_tools.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/commit.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/dead_code.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/env_config.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/env_files.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/find_injection.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/find_repo.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/gh_args.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/gh_issue.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/gh_pr.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/github_api.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/gitrepo.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/injection_frontend.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/injection_python.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/issue_do.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/issue_show.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/issue_watch.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/lint.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/lint_findings.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/lint_models.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/lint_sql.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/lint_sql_files.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/lint_tooling.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/lint_typescript.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/logs.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_build.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_cancel.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_choice.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_create_args.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_info.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_issue_link.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_labels.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_markdown.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_merge_defaults.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pr_ref.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/pull.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/testdb.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/translate.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/__init__.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/cli.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/pricing.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/sql/00_schema.sql +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/sql/01_ingest_claude.sql +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/sql/01_ingest_codex.sql +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/sql/02_messages.sql +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/usage/sql/03_markers.sql +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/bmsdna/devtools/worktree.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/justfile +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/skills/bmsdna-devtools/SKILL.md +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/conftest.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/fake_github.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_ado_auth.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_ado_issue.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_ado_issue_flow.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_agent_mentions.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_api_usage.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_app_service_logs.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_azure_arm.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_bdt_config.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_business_user.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_ci_plan.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_cli_cleanup.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_cli_commit.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_cli_issue.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_cli_pr_create.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_cli_pr_id.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_cli_pull.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_cli_tools.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_cli_version.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_commit.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_env_config.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_env_files.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_find_injection.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_find_repo.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_gh_issue.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_gh_pr.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_github_api.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_gitrepo.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_issue_do.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_issue_for_me.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_issue_show.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_issue_watch.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_lint.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_lint_models.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_lint_sql.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_lint_sql_files.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_lint_tooling.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_lint_typescript.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_logs.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_build.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_build_create_options.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_build_flow.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_cancel_build.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_choice.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_create_args.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_description_not_truncated.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_info.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_issue_link.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_labels.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_markdown.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pr_merge_defaults.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_pull.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_testdb.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_translate.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_wait_timeout.py +0 -0
- {bmsdna_devtools-0.52.0 → bmsdna_devtools-0.54.0}/tests/test_worktree_clean.py +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: bmsdna-devtools
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.54.0
|
|
4
4
|
Summary: Shared Azure DevOps / GitHub / git / Azure Monitor developer tooling for BMS projects
|
|
5
5
|
Requires-Python: >=3.14
|
|
6
6
|
Requires-Dist: azure-identity>=1.19.0
|
|
7
|
+
Requires-Dist: packaging>=24.0
|
|
7
8
|
Requires-Dist: pgdevkit[db]>=0.7.1
|
|
8
9
|
Requires-Dist: requests>=2.32.0
|
|
9
10
|
Requires-Dist: rich>=13.0.0
|
|
@@ -934,8 +935,12 @@ Order of decision, always logged with its reason:
|
|
|
934
935
|
4. Anything unreadable (label API, change list) runs everything: a missing decision never silently skips tests.
|
|
935
936
|
|
|
936
937
|
Outputs (Azure Pipelines variables with `isOutput=true`; plain `name=value` lines elsewhere): `runTests`, and per tier
|
|
937
|
-
(`unit`, `e2e`, ...) `<tier>Run`, `<tier>Areas` and `<tier>Paths`, a shell-quoted argument list for the runner
|
|
938
|
-
tier you do not configure and split by area (e.g. flat unit tests) is simply gated on `runTests`.
|
|
938
|
+
(`unit`, `e2e`, ...) `<tier>Run`, `<tier>Areas` and `<tier>Paths`, a shell-quoted argument list for the runner (repo-
|
|
939
|
+
relative). A tier you do not configure and split by area (e.g. flat unit tests) is simply gated on `runTests`. For
|
|
940
|
+
custom sharding or a runner that does not take paths, use `<tier>Areas` (a space-separated list: keep area names free
|
|
941
|
+
of whitespace if you split it): in folder mode the `<tier>Paths` of a full run
|
|
942
|
+
is the bare tier folder, which may also hold things that are not tests (`.venv`, `test-results`); in glob mode it is the
|
|
943
|
+
list of test files either way. A moved file counts as changed under both its old and its new path.
|
|
939
944
|
|
|
940
945
|
```yaml
|
|
941
946
|
- stage: Plan
|
|
@@ -1206,6 +1211,48 @@ catch-all, service-to-service endpoints and an external API folder.
|
|
|
1206
1211
|
then on only *new* unused routes fail -- and a baseline line whose route has since been deleted, excluded or
|
|
1207
1212
|
used is reported as `api-route-baseline-stale`, so the list can only shrink.
|
|
1208
1213
|
|
|
1214
|
+
## `bdt deps affected` / `bdt deps advisories`
|
|
1215
|
+
|
|
1216
|
+
Security incidents and supply chain attacks (bmsuisse/devtools#113): which locked dependencies are touched? Both
|
|
1217
|
+
commands only read: they never edit a file, a lock or an environment. They cover `uv.lock` (PyPI) and `bun.lock` (npm)
|
|
1218
|
+
below each `--path` (default: the current directory; `node_modules`, virtualenvs, `.git` and `.worktrees` are skipped).
|
|
1219
|
+
Git, path, alias and workspace sources can't be matched against an advisory: they are listed as `unsupported`, never skipped.
|
|
1220
|
+
|
|
1221
|
+
```bash
|
|
1222
|
+
bdt deps affected lodash --version-spec "<4.17.21" --path ~/projects/CCMT2 --path ~/projects/OneSales
|
|
1223
|
+
bdt deps advisories --path . # OSV lookup of every locked version, one status per affected package
|
|
1224
|
+
bdt deps advisories --json # machine-readable
|
|
1225
|
+
```
|
|
1226
|
+
|
|
1227
|
+
`affected PACKAGE` lists the locked versions of one package (PyPI names are normalised, npm names exact; `--ecosystem`
|
|
1228
|
+
narrows) and marks those matching `--version-spec` (comparators such as `<4.17.21` or `>=1.0,<2`, comma = and). Exit 0
|
|
1229
|
+
none matches, 1 a locked version matches, 2 setup error (no lockfile, unreadable lockfile, bad spec), 3 incomplete (a
|
|
1230
|
+
git/path/alias source of that name could not be matched).
|
|
1231
|
+
|
|
1232
|
+
`advisories` queries [OSV](https://osv.dev) (GHSA, PYSEC and the OpenSSF `MAL-` malicious-package advisories) and the
|
|
1233
|
+
CISA KEV feed, groups aliases (GHSA = PYSEC = CVE) and reports per locked package one status. The maintenance skill's
|
|
1234
|
+
cooldown exception flow (`references/audit.md`) acts on it:
|
|
1235
|
+
|
|
1236
|
+
| Status | Meaning |
|
|
1237
|
+
|---|---|
|
|
1238
|
+
| `malicious` | a `MAL-` advisory covers the locked version: an incident, not a bump |
|
|
1239
|
+
| `needs-triage` | affected range, fix, or (when the fix is inside the cooldown) severity is missing, conflicting or unparseable |
|
|
1240
|
+
| `no-fix` | an affected advisory has no fixed version |
|
|
1241
|
+
| `blocked` | the fixed version is outside the range the project declares for a direct dependency |
|
|
1242
|
+
| `exempt-eligible` | high/critical (CVSS v3 score >= 7 and/or GHSA label; sources that disagree go to triage) or in CISA KEV, and the fixed version is younger than the cooldown (or its age is unknown) |
|
|
1243
|
+
| `bump` | the fixed version is older than the cooldown: a normal bump takes it |
|
|
1244
|
+
| `informational` | affected, lower severity, fix still inside the cooldown |
|
|
1245
|
+
|
|
1246
|
+
The target version is the lowest one the advisory data shows to be outside every affected range of the urgent
|
|
1247
|
+
advisories (all of them when none is urgent), never "latest". Lower-severity advisories that need a newer version stay open until a normal bump, and the finding names them. `next:` lines give the per-invocation commands. Unsupported sources are listed but don't change the exit code. The fix's age
|
|
1248
|
+
comes from the registry (PyPI: youngest file; npm: `time[version]`); `--cooldown-days` (default 5) is the project's
|
|
1249
|
+
cooldown. Compatibility with the parents' ranges of a *transitive* dependency isn't known here: re-run after the bump.
|
|
1250
|
+
|
|
1251
|
+
It fails closed: OSV, KEV or an advisory record that can't be read is reported as `incomplete` with exit 3, never as
|
|
1252
|
+
"no advisory". Exit 0 no affected locked version, 1 affected, 2 setup error, 3 incomplete. `uv audit` / `bun audit`
|
|
1253
|
+
remain the per-repo CI checks; this command adds what they don't give uniformly (fixed version and severity for both
|
|
1254
|
+
ecosystems, KEV, `MAL-` advisories, the fix's age against the cooldown) and scans many repos in one run.
|
|
1255
|
+
|
|
1209
1256
|
## `bdt find-injection`
|
|
1210
1257
|
|
|
1211
1258
|
Scans backend and frontend code for injection risks, and warns when a web project has no
|
|
@@ -1260,6 +1307,10 @@ writes `report.html` (charts plus a table view, light/dark) with CSV / Parquet e
|
|
|
1260
1307
|
(`~/.cache/bdt/usage/`, or `--db` / `--out`). The report is self-contained and contains your session titles and agent
|
|
1261
1308
|
descriptions, so look at it before sharing it.
|
|
1262
1309
|
|
|
1310
|
+
- **Before vs. after:** the turns of a session before it loaded `dev-workflow` (or ran its first workflow command such as
|
|
1311
|
+
`bdt worktree`) are their own step, "Before dev-workflow was loaded", for the main thread and for the subagents spawned
|
|
1312
|
+
then. Everything from that point on is split into the steps below. The summary has `cost_before_workflow` /
|
|
1313
|
+
`cost_after_workflow`. Sessions that never load it are not counted, unless `--scope all`.
|
|
1263
1314
|
- **Steps:** setup, plan, plan review, implement, test, screenshots, design review, quick review, full review, publish / CI.
|
|
1264
1315
|
Every model turn is assigned to one by markers in its tool calls: skill calls (`bms-code-review --quick|--full`,
|
|
1265
1316
|
`design-review`, `bms-plan-review`; for codex, reading the skill's `SKILL.md`), `bdt` commands, edits (`apply_patch` for
|
|
@@ -916,8 +916,12 @@ Order of decision, always logged with its reason:
|
|
|
916
916
|
4. Anything unreadable (label API, change list) runs everything: a missing decision never silently skips tests.
|
|
917
917
|
|
|
918
918
|
Outputs (Azure Pipelines variables with `isOutput=true`; plain `name=value` lines elsewhere): `runTests`, and per tier
|
|
919
|
-
(`unit`, `e2e`, ...) `<tier>Run`, `<tier>Areas` and `<tier>Paths`, a shell-quoted argument list for the runner
|
|
920
|
-
tier you do not configure and split by area (e.g. flat unit tests) is simply gated on `runTests`.
|
|
919
|
+
(`unit`, `e2e`, ...) `<tier>Run`, `<tier>Areas` and `<tier>Paths`, a shell-quoted argument list for the runner (repo-
|
|
920
|
+
relative). A tier you do not configure and split by area (e.g. flat unit tests) is simply gated on `runTests`. For
|
|
921
|
+
custom sharding or a runner that does not take paths, use `<tier>Areas` (a space-separated list: keep area names free
|
|
922
|
+
of whitespace if you split it): in folder mode the `<tier>Paths` of a full run
|
|
923
|
+
is the bare tier folder, which may also hold things that are not tests (`.venv`, `test-results`); in glob mode it is the
|
|
924
|
+
list of test files either way. A moved file counts as changed under both its old and its new path.
|
|
921
925
|
|
|
922
926
|
```yaml
|
|
923
927
|
- stage: Plan
|
|
@@ -1188,6 +1192,48 @@ catch-all, service-to-service endpoints and an external API folder.
|
|
|
1188
1192
|
then on only *new* unused routes fail -- and a baseline line whose route has since been deleted, excluded or
|
|
1189
1193
|
used is reported as `api-route-baseline-stale`, so the list can only shrink.
|
|
1190
1194
|
|
|
1195
|
+
## `bdt deps affected` / `bdt deps advisories`
|
|
1196
|
+
|
|
1197
|
+
Security incidents and supply chain attacks (bmsuisse/devtools#113): which locked dependencies are touched? Both
|
|
1198
|
+
commands only read: they never edit a file, a lock or an environment. They cover `uv.lock` (PyPI) and `bun.lock` (npm)
|
|
1199
|
+
below each `--path` (default: the current directory; `node_modules`, virtualenvs, `.git` and `.worktrees` are skipped).
|
|
1200
|
+
Git, path, alias and workspace sources can't be matched against an advisory: they are listed as `unsupported`, never skipped.
|
|
1201
|
+
|
|
1202
|
+
```bash
|
|
1203
|
+
bdt deps affected lodash --version-spec "<4.17.21" --path ~/projects/CCMT2 --path ~/projects/OneSales
|
|
1204
|
+
bdt deps advisories --path . # OSV lookup of every locked version, one status per affected package
|
|
1205
|
+
bdt deps advisories --json # machine-readable
|
|
1206
|
+
```
|
|
1207
|
+
|
|
1208
|
+
`affected PACKAGE` lists the locked versions of one package (PyPI names are normalised, npm names exact; `--ecosystem`
|
|
1209
|
+
narrows) and marks those matching `--version-spec` (comparators such as `<4.17.21` or `>=1.0,<2`, comma = and). Exit 0
|
|
1210
|
+
none matches, 1 a locked version matches, 2 setup error (no lockfile, unreadable lockfile, bad spec), 3 incomplete (a
|
|
1211
|
+
git/path/alias source of that name could not be matched).
|
|
1212
|
+
|
|
1213
|
+
`advisories` queries [OSV](https://osv.dev) (GHSA, PYSEC and the OpenSSF `MAL-` malicious-package advisories) and the
|
|
1214
|
+
CISA KEV feed, groups aliases (GHSA = PYSEC = CVE) and reports per locked package one status. The maintenance skill's
|
|
1215
|
+
cooldown exception flow (`references/audit.md`) acts on it:
|
|
1216
|
+
|
|
1217
|
+
| Status | Meaning |
|
|
1218
|
+
|---|---|
|
|
1219
|
+
| `malicious` | a `MAL-` advisory covers the locked version: an incident, not a bump |
|
|
1220
|
+
| `needs-triage` | affected range, fix, or (when the fix is inside the cooldown) severity is missing, conflicting or unparseable |
|
|
1221
|
+
| `no-fix` | an affected advisory has no fixed version |
|
|
1222
|
+
| `blocked` | the fixed version is outside the range the project declares for a direct dependency |
|
|
1223
|
+
| `exempt-eligible` | high/critical (CVSS v3 score >= 7 and/or GHSA label; sources that disagree go to triage) or in CISA KEV, and the fixed version is younger than the cooldown (or its age is unknown) |
|
|
1224
|
+
| `bump` | the fixed version is older than the cooldown: a normal bump takes it |
|
|
1225
|
+
| `informational` | affected, lower severity, fix still inside the cooldown |
|
|
1226
|
+
|
|
1227
|
+
The target version is the lowest one the advisory data shows to be outside every affected range of the urgent
|
|
1228
|
+
advisories (all of them when none is urgent), never "latest". Lower-severity advisories that need a newer version stay open until a normal bump, and the finding names them. `next:` lines give the per-invocation commands. Unsupported sources are listed but don't change the exit code. The fix's age
|
|
1229
|
+
comes from the registry (PyPI: youngest file; npm: `time[version]`); `--cooldown-days` (default 5) is the project's
|
|
1230
|
+
cooldown. Compatibility with the parents' ranges of a *transitive* dependency isn't known here: re-run after the bump.
|
|
1231
|
+
|
|
1232
|
+
It fails closed: OSV, KEV or an advisory record that can't be read is reported as `incomplete` with exit 3, never as
|
|
1233
|
+
"no advisory". Exit 0 no affected locked version, 1 affected, 2 setup error, 3 incomplete. `uv audit` / `bun audit`
|
|
1234
|
+
remain the per-repo CI checks; this command adds what they don't give uniformly (fixed version and severity for both
|
|
1235
|
+
ecosystems, KEV, `MAL-` advisories, the fix's age against the cooldown) and scans many repos in one run.
|
|
1236
|
+
|
|
1191
1237
|
## `bdt find-injection`
|
|
1192
1238
|
|
|
1193
1239
|
Scans backend and frontend code for injection risks, and warns when a web project has no
|
|
@@ -1242,6 +1288,10 @@ writes `report.html` (charts plus a table view, light/dark) with CSV / Parquet e
|
|
|
1242
1288
|
(`~/.cache/bdt/usage/`, or `--db` / `--out`). The report is self-contained and contains your session titles and agent
|
|
1243
1289
|
descriptions, so look at it before sharing it.
|
|
1244
1290
|
|
|
1291
|
+
- **Before vs. after:** the turns of a session before it loaded `dev-workflow` (or ran its first workflow command such as
|
|
1292
|
+
`bdt worktree`) are their own step, "Before dev-workflow was loaded", for the main thread and for the subagents spawned
|
|
1293
|
+
then. Everything from that point on is split into the steps below. The summary has `cost_before_workflow` /
|
|
1294
|
+
`cost_after_workflow`. Sessions that never load it are not counted, unless `--scope all`.
|
|
1245
1295
|
- **Steps:** setup, plan, plan review, implement, test, screenshots, design review, quick review, full review, publish / CI.
|
|
1246
1296
|
Every model turn is assigned to one by markers in its tool calls: skill calls (`bms-code-review --quick|--full`,
|
|
1247
1297
|
`design-review`, `bms-plan-review`; for codex, reading the skill's `SKILL.md`), `bdt` commands, edits (`apply_patch` for
|
|
@@ -116,11 +116,15 @@ def _git(
|
|
|
116
116
|
|
|
117
117
|
def changed_files(target: str, *, merge_checkout: bool) -> list[str]:
|
|
118
118
|
"""Files the PR changes: in CI HEAD is the synthetic PR merge commit, compared with its first parent (the target);
|
|
119
|
-
for a local dry run the branch is compared with `origin/<target>` (it may contain ordinary merges).
|
|
119
|
+
for a local dry run the branch is compared with `origin/<target>` (it may contain ordinary merges).
|
|
120
|
+
`--no-renames` lists a moved file under its old path too: rename detection would hide the old path, so code moved
|
|
121
|
+
into a `non_code` folder (or a test moved between areas) would look like nothing happened to the old place.
|
|
122
|
+
`-z` keeps non-ASCII and other unusual names unquoted (git's default quoting would defeat every glob)."""
|
|
120
123
|
diff = ("HEAD^1", "HEAD") if merge_checkout else (f"origin/{target}...HEAD",)
|
|
124
|
+
out = _git("diff", "--name-only", "--no-renames", "-z", *diff).stdout
|
|
121
125
|
return [
|
|
122
|
-
|
|
123
|
-
]
|
|
126
|
+
path for path in out.split("\0") if path
|
|
127
|
+
] # -z: git would quote names like test_\303\274ber.py
|
|
124
128
|
|
|
125
129
|
|
|
126
130
|
def verify_fix_base(env: Mapping[str, str]) -> None:
|
|
@@ -41,6 +41,7 @@ from .bdt_config import find_pyproject, load_bdt_table
|
|
|
41
41
|
from .cli_tools import CLI_TIMEOUT_SECS, EXIT_WAIT_TIMEOUT, detect_agent_session, require_gh
|
|
42
42
|
from .github_api import GitHubClient
|
|
43
43
|
from .pr_create_args import PrCreateArgsError, extract_labels, parse_pr_create_args, resolve_body, unsupported_notes
|
|
44
|
+
from .deps.cli import deps_app
|
|
44
45
|
from .usage.cli import usage_app
|
|
45
46
|
from .gitrepo import (
|
|
46
47
|
AdoRemote,
|
|
@@ -133,6 +134,7 @@ logs_app = typer.Typer(name="logs", help="Application Insights / Log Analytics q
|
|
|
133
134
|
app.add_typer(logs_app, name="logs")
|
|
134
135
|
|
|
135
136
|
app.add_typer(usage_app, name="usage")
|
|
137
|
+
app.add_typer(deps_app, name="deps")
|
|
136
138
|
|
|
137
139
|
ci_app = typer.Typer(name="ci", help="CI helpers (Azure Pipelines)")
|
|
138
140
|
app.add_typer(ci_app, name="ci")
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"""`bdt deps`: which locked dependencies a security advisory or supply chain incident touches (bmsuisse/devtools#113).
|
|
2
|
+
|
|
3
|
+
- `lockfiles` -- read `uv.lock` (PyPI) and `bun.lock` (npm) into one shape
|
|
4
|
+
- `versions` -- version parsing, comparison and range matching per ecosystem
|
|
5
|
+
- `osv` -- OSV / CISA KEV / registry timestamp client (the only network code)
|
|
6
|
+
- `advisories` -- turns OSV records into a per-package status; pure logic, no I/O
|
|
7
|
+
"""
|