ci: add dependabot auto-merge workflow#2705
Conversation
|
Assessment: Comment Well-designed automation workflow with strong security posture (sanitization pipeline, read-only agent, separated read/write phases). The defense-in-depth approach is solid. Review Themes
The sanitization scripts are clean and well-documented. Good use of the monorepo structure for the integration test routing. |
|
Thanks for the review. Addressed in 978c477: Critical (found in dependabot-analyze devtools PR): the input parser crashed under Sanitizer (line 87, 92): now decodes HTML entities before injection-pattern matching, and truncates the untrusted payload before prepending the preamble/wrapper (so the cap applies only to attacker-influenceable text and the closing tag can't be truncated away). Shell arg (line 34): PR title is now piped via stdin instead of passed as a positional argument; the parser reads stdin when no argv is given. Heredoc delimiter (line 44): now uses a random Verdict filter (line 111): restricted to comments authored by flag-for-review (line 177): condition now fires whenever a safe python/typescript verdict's integration tests did not pull_request_target code execution: added a same-repo head guard ( Test paths: script tests now resolve the script via Left as-is (intentional): the Python/TypeScript jobs use different AWS role secrets to mirror the existing |
978c475 to
4c4d334
Compare
|
Removed the unit test files from the PR (force-pushed). They were run locally to validate the parser and sanitizer (15 passing, including HTML-entity injection and truncation-boundary cases) but are kept out of the PR per repo preference. The branch now contains only the two scripts and two workflows. |
|
Assessment: Comment The author's fixes in 978c477 thoroughly address all prior review findings. One remaining functional issue: the Details
Strong security design overall — the defense-in-depth sanitization pipeline and privilege separation are well thought out. |
|
Assessment: Request Changes The previous review findings were well-addressed (sanitizer hardening, stdin piping, random delimiter, restricted verdict filter, same-repo head guard). However, one critical issue remains with the Review Details
The sanitization pipeline and security architecture are solid. The fix for the critical issue is straightforward — add |
Guard finalize against the skipped-pipeline cascade and require a successful verdict job before flag-for-review can label a PR, so the workflow no longer creates spurious check runs or labels on PRs from other authors.
|
Good catch on the non-dependabot cascade — fixed in dd9d9d6. The Fixes:
Verified exhaustively that (a) no terminal job fires for a non-dependabot PR, and (b) every dependabot verdict×ecosystem×test-result combination still resolves to exactly one terminal outcome. |
Match only github-actions[bot] comments carrying a DEPENDABOT_VERDICT marker so an unrelated agent comment (e.g. a prior /strands review) cannot be misread as this PR's verdict.
|
Addressed in 2458909 (+ devtools#61 @ 0d41152):
|
|
Assessment: Approve All issues from prior review rounds have been properly addressed in dd9d9d6. The non-dependabot cascade is now correctly prevented by Verified Fixes
Clean, well-documented workflow with strong defense-in-depth. The |
|
Assessment: Approve All previously raised issues are resolved. The latest commit (2458909) adds a Verification Summary
No new issues found. Ready to merge once the devtools#61 dependency lands. |
Summary
dependabot-auto-merge.yml: analyzes dependabot PRs with a read-only Strands agent, runs integration tests on safe Python/TypeScript updates, and enables auto-mergeparse_dependabot_title.pyandsanitize_dependabot_body.py(with tests) to defend against prompt injectiondependabot-integration-tests.ymlrouting by ecosystem (python/typescript)Depends on strands-agents/devtools#61 (dependabot-analyze SOP, mode wiring, and
sanitized_changelogagent-runner input). That PR must merge first since this workflow references the devtools actions at@main.How it works
<untrusted-changelog>blockDependabot Analysischeck runsafePython/TypeScript updates → integration tests → auto-merge once branch protection is satisfiedsafedocs/actions updates → labeleddependabot-safe, left for manual merge (preview link review)dependabot-needs-reviewSecurity
All external content (PR body, changelog) is sanitized and wrapped in
<untrusted-changelog>tags before reaching the agent. The agent runs withwrite_permission: false. Upstream commit fetches are restricted to URL-validated GitHub sources.Test plan
/strands dependabot-analyzeon an existing dependabot PR; confirm the analysis comment and check rundependabot-needs-review