Repository navigation
feat(workflow,docs): dependabot-resync helper + SRE Dependency Guardian audit (2026-04-27) - #239
Closed
cursor[bot] wants to merge 1 commit into
Closed
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
…udit (2026-04-27) Slack-triggered SRE Dependency Guardian pass on the five open PRs against main on 2026-04-27 (#221 / #222 / #223 / #224 / #226). One systemic Medium finding stays unchanged from the earlier audit on #234: every Dependabot pip PR breaks tests/test_dependency_artifacts_sync.py because the bot edits requirements.txt without running 'uv lock' / 'uv export'. Concrete companion fix shipped here (audit-and-block: no push to any audited Dependabot branch): - scripts/dependabot-resync.sh / .ps1 -- paired Linux/macOS + Windows helper the operator runs on a checked-out Dependabot pip PR. Runs 'uv lock', then 'uv export --no-emit-package pyproject.toml -o requirements.txt' with the exact flags tests/test_dependency_artifacts_sync.py expects, then re-runs the pytest. Prints diagnostic-on-fall guidance pointing at .cursor/skills/dependabot-recommendations/SKILL.md when the guard still fails (THE_ART_OF_THE_FALLBACK doctrine: never silent fallback). --commit flag stages and commits with 'chore(deps): resync uv.lock + requirements.txt after Dependabot bump'. - docs/ops/sre_audits/README.md -- anchors the audit folder on main (the prior audit lives only on PR #234's branch and would be lost if that PR is closed without merge). Indexes the new audit file. - docs/ops/sre_audits/PR_SECURITY_AUDIT_2026-04-27_dependency_guardian.md -- per-PR notes (#226 safe to merge; #224 cryptography 47.0.0 manual review with caller map at core/licensing/verify.py; #222 chardet 7.4.3 manual review on the encoding fallback path; #221 / #223 info, blocked by 2.1 only). Decision rule: applied locally is safer than rage-merge. Doctrine references applied (per Slack-triggered protocol): - DEFENSIVE_SCANNING_MANIFESTO.md -- no surprise side effects when we touch the supply chain (an inconsistent lockfile would be the equivalent of a 'guest in customer DB' violation). - THE_ART_OF_THE_FALLBACK.md -- diagnostic on fall: helper prints next steps before exiting non-zero, never swallows the error. - SUPPLY_CHAIN_AND_TRUST_SIGNALS.md -- SBOM <-> wheel alignment. Verification: - bash scripts/dependabot-resync.sh --check passes on this branch. - uv run pytest tests/test_dependency_artifacts_sync.py passes. - uv run ruff check / ruff format --check / pt-BR / commercial / PII / external-plan-links guards all pass. - ASCII-safety guard for the new .ps1 passes. Operational constraint respected: no commit pushed to #221, #222, #223, #224, or #226. The helper is the safe local fix the maintainer can run per branch. Co-authored-by: Fabio Tavares Leitão <[email protected]>
This was referenced Apr 27, 2026
1 of 3 tasks
This was referenced Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slack-triggered SRE Dependency Guardian pass on the five Dependabot PRs open against
mainon 2026-04-27 — #221 (pip-minor-patch group, 35 pkgs), #222 (chardet 5.2.0 → 7.4.3), #223 (tzdata 2025.3 → 2026.2), #224 (cryptography 46.0.7 → 47.0.0), #226 (pyo3 0.23.5 → 0.24.1, Cargo). Audit-and-block posture preserved: no commit pushed to any audited Dependabot branch.The systemic Medium finding from the earlier audit (PR #234) is unchanged: every Dependabot pip PR breaks
tests/test_dependency_artifacts_sync.pybecause the bot does not runuv lock/uv export, so the project's single-source-of-truth guard (pyproject ↔ uv.lock ↔ requirements.txt) is red on #221, #222, #223, #224. CI on #226 (Cargo path) is fully green.This PR ships the concrete companion fix: a paired helper the maintainer can run on a checked-out Dependabot pip branch to make the guard turn green in five seconds, plus the audit folder anchored on
mainso future passes have an index.Findings (per Dependency Guardian rule — Medium+ only)
requirements.txtanduv exportoutput. A rage-merge to land a security bump (e.g. cryptography for a future CVE) would land an inconsistent lockfile + a misaligned SBOM — exactly the fail-open pattern flagged bydocs/ops/inspirations/SUPPLY_CHAIN_AND_TRUST_SIGNALS.md.cryptography 46.0.7 → 47.0.0(deps(pip): bump cryptography from 46.0.7 to 47.0.0 #224, §3.1) andchardet 5.2.0 → 7.4.3(deps(pip): bump chardet from 5.2.0 to 7.4.3 #222, §3.2) are major-version jumps on hot code paths (Ed25519 license JWT verification atcore/licensing/verify.py; encoding fallback hierarchy fromTHE_ART_OF_THE_FALLBACK.md). Need green CI before merge — and CI is currently red because of §2.1.tzdata(deps(pip): bump tzdata from 2025.3 to 2026.2 #223), thepip-minor-patchgroup (deps(pip): bump the pip-minor-patch group across 1 directory with 35 updates #221, info-only blocked by §2.1), and thepyo3cargo bump (chore(deps): bump pyo3 from 0.23.5 to 0.24.1 in /rust/boar_fast_filter in the cargo group across 1 directory #226, recommend merge as-is).Action taken (this PR)
scripts/dependabot-resync.sh+scripts/dependabot-resync.ps1— paired Linux/macOS + Windows helper (perdocs/ops/SCRIPTS_CROSS_PLATFORM_PAIRING.md). Runsuv lock, thenuv export --no-emit-package pyproject.toml -o requirements.txtwith the exact flags the guard expects, then re-runstests/test_dependency_artifacts_sync.py -v -W error. Diagnostic-on-fall: prints actionable next steps pointing at.cursor/skills/dependabot-recommendations/SKILL.mdbefore exiting non-zero (THE_ART_OF_THE_FALLBACK.mdclause: never silent fallback). Flags:--check(read-only verify),--commit/-Commit(stage + commit withchore(deps): resync uv.lock + requirements.txt after Dependabot bump).docs/ops/sre_audits/README.md— anchors the audit folder onmain(the prior audit on PR docs(ops): SRE security audit of open PRs (2026-04-27) #234 lives only on its own branch and would be lost if closed without merge). Index of audit deliverables.docs/ops/sre_audits/PR_SECURITY_AUDIT_2026-04-27_dependency_guardian.md— full per-PR audit (TL;DR, methodology, systemic finding RCA, per-PR sections with caller maps, action items, doctrine references).Operator workflow (after this lands):
Recommended next moves (handed back to the maintainer)
pyo3 0.24is a documented compatible bump and the upstream RUSTSEC fix (PyString::from_object) is defense-in-depth (this repo does not call that API today).--commitflag handles the regen commit;git pushflips CI green.pull_request_targetworkflow that runsdependabot-resync.sh --checkon every Dependabot pip PR and posts the regen diff as a PR comment. Captured in the audit doc; needspermissions: pull-requests: writeplus a strict actor check (dependabot[bot]head only).Doctrine references
docs/ops/inspirations/DEFENSIVE_SCANNING_MANIFESTO.md(NASA SEL · Cloudflare · Steve Gibson — guest in customer DB; no surprise side effects). An inconsistent lockfile is the supply-chain equivalent of clause 3.docs/ops/inspirations/THE_ART_OF_THE_FALLBACK.md(no silent failure; diagnostic-on-fall — encoded directly in the helper's failure path).docs/ops/inspirations/SUPPLY_CHAIN_AND_TRUST_SIGNALS.md(SBOM ↔ wheel alignment)..cursor/skills/dependabot-recommendations/SKILL.md(operator workflow that this helper makes mechanical).Files
scripts/dependabot-resync.sh(executable, Linux/macOS).scripts/dependabot-resync.ps1(Windows pair, ASCII-safe pertests/test_scripts.py::test_powershell_scripts_ascii_safe).docs/ops/sre_audits/README.md(folder anchor + index).docs/ops/sre_audits/PR_SECURITY_AUDIT_2026-04-27_dependency_guardian.md(full audit).Verification
bash scripts/dependabot-resync.sh --check—uv lock --checkreturns zero, dependency-artifacts pytest passes.uv run pytest tests/test_dependency_artifacts_sync.py tests/test_markdown_lint.py tests/test_docs_pt_br_locale.py tests/test_confidential_commercial_guard.py tests/test_pii_guard.py tests/test_docs_external_no_plan_links.py -q— 147 passed locally.uv run ruff check .anduv run ruff format --check .— clean.pre-commithooks (Ruff / plans-stats / markdown / pt-BR / commercial / external plan links / dependency-artifacts sync / PII / PII history) — all Passed at commit time.tests/test_scripts.py::test_powershell_scripts_ascii_safe— passed.tests/test_scripts.pycannot run in this Linux container withoutpwsh; those failures are environmental and pre-exist this branch — full CI on GitHub Actions runs them withpwsh.)Operational constraint
Audit-and-block respected. No commit was pushed to #221, #222, #223, #224, or #226. The maintainer keeps full control of when to run the helper on each Dependabot PR.