Skip to content

ci(deps): label npm Dependabot PRs for the fullsend fix agent - #68

Closed
shairevivo wants to merge 1 commit into
mainfrom
agent/dependabot-fix-label
Closed

shairevivo wants to merge 1 commit into
mainfrom
agent/dependabot-fix-label

Conversation

@shairevivo

Copy link
Copy Markdown
Collaborator

Problem

Fullsend's fix agent was already being dispatched for Dependabot PRs — the review agent posts a CHANGES_REQUESTED review, the dispatch routes to the fix stage — but check-fix-eligibility.sh then skips the run:

##[warning]PR #63 (author: app/dependabot, is_bot: true) is not the coder bot
and lacks 'fullsend-fix' label — skipping bot-triggered fix

(run 42797063008)

The gate allows a bot-triggered fix when the PR author is fullsend-ai-coder[bot] or the PR carries the fullsend-fix label. Dependabot is neither.

Change

Dependabot applies labels: ["dependencies", "fullsend-fix"] to npm PRs at creation, so the label is present before the review that triggers the fix. labels replaces the default dependencies label rather than adding to it, so both are listed.

The github-actions entry is deliberately not labeled: those PRs can only edit .github/workflows/, and the coder app has no workflows permission, so a fix run could never push its commit (it would fail after burning a full inference run).

After merge

🤖 Generated with Claude Code

The fix agent only auto-runs on bot-authored PRs when the author is the
fullsend coder bot or the PR carries the `fullsend-fix` label
(check-fix-eligibility.sh). Dependabot is neither, so review's
changes_requested reviews on dependency PRs were routed to the fix stage
and then skipped at the eligibility gate (run 42797063008, PR #63).

Have Dependabot apply the label at creation so it is present before the
first review. `labels` replaces Dependabot's default `dependencies` label
rather than adding to it, so both are listed.

The github-actions entry is intentionally left unlabeled: the coder app
has no `workflows` permission, so a fix run on a PR that edits
.github/workflows/ could never push its commit.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:20 PM UTC · Completed 12:28 PM UTC

Commit: ca8a005 · View workflow run →

Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $2.94

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Nov 10, 2026
@fullsend-ai-review

Copy link
Copy Markdown

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Single 5-line addition to .github/dependabot.yml (a protected CI path) is minimal in size but that file shows elevated churn (5 commits in 30 days) and 3 fix-commits in 90 days, warranting moderate review.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

High

Medium

  • [permission-expansion] .github/dependabot.yml:15 — Today a human opts each PR into fix runs by adding fullsend-fix. With Dependabot applying the label at creation, every npm Dependabot PR is opted in automatically. Per the PR body and the trust-boundary comment in auto-merge.yml (lines 29-32), fix runs push with the coder app token, the only fullsend app with contents: write. So the fix agent can push commits to Dependabot branches with no human review first. Dependabot PR bodies carry release notes, changelogs and commit titles written by third-party package maintainers. The security-updates group matches every package (patterns: ["*"], line 19). Together, that gives untrusted upstream text a path into an agent that can write to the repo. Some of this cannot be checked from this repo: how check-fix-eligibility.sh gates runs (it lives in the external fullsend-ai/fullsend repo), and whether the fix agent runs npm lifecycle scripts and with which credentials. Existing mitigations:

    • auto-merge.yml only merges fullsend-ai-coder[bot] PRs (line 61) that touch src/ or public/ (lines 130-141), so Dependabot PRs still need a human to merge them.
    • /fs-fix-stop (fullsend.yaml lines 63-137) lets an authorized user opt a PR out.

    The remaining risk: agent commits land on a branch authored by dependabot[bot], and a human merging what looks like a routine bump may not notice them. The repo records decisions like this in an issue (auto-merge.yml cites Authorize auto-merge workflow and full-auto triage promotion (demo) #11). This trust-boundary change has no linked issue or ADR.
    Remediation: Record the decision in a linked issue or ADR. Cover (a) Dependabot PR bodies, with upstream maintainer text, now feeding an agent with write access, and (b) whether the fix agent runs npm lifecycle scripts and which credentials are present when it does. Consider narrowing the opt-in: label only security-update PRs through a separate Dependabot entry, or keep the label human-applied. Also consider flagging Dependabot PRs that contain commits not authored by dependabot[bot], so pushed fix commits are not merged unnoticed.

Low

  • [edge-case] .github/dependabot.yml:15 — Setting labels replaces all of Dependabot's default labels, not just dependencies. With more than one ecosystem configured, Dependabot also adds an ecosystem label: chore(deps-dev): bump @types/node from 22.20.5 to 26.6.6 #63 and chore(deps-dev): bump @types/jest from 27.4.1 to 30.0.0 #64 carry javascript. New npm PRs will quietly lose javascript. The comment on lines 13-14 says "default label" (singular), which understates what gets dropped. No workflow in .github/workflows/ refers to javascript, so nothing in this repo breaks. Outside filters or saved searches that rely on the label would stop matching.
    Remediation: If the ecosystem label matters, use labels: ["dependencies", "javascript", "fullsend-fix"]. Otherwise, change the comment to say the default labels (plural, including the ecosystem label) are replaced.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.

Comment thread .github/dependabot.yml
# from its own coder bot unless this label is present
# (check-fix-eligibility.sh). `dependencies` is listed explicitly because
# `labels` replaces Dependabot's default label rather than adding to it.
labels: ["dependencies", "fullsend-fix"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] permission-expansion

This PR adds the fullsend-fix label to every npm Dependabot PR when Dependabot opens it. Until now a human had to opt each PR in; with this change every npm Dependabot PR is opted in ahead of time. The PR body and the comment on lines 11-13 say this label is what lets check-fix-eligibility.sh allow a bot-triggered fix run on a PR not authored by the coder bot. That script lives in the external fullsend-ai/fullsend repo, so this cannot be checked here. According to the trust-boundary comment in auto-merge.yml (lines 29-32), fix runs push with the coder app token, the only fullsend app with contents:write. So the fix agent can now push commits to Dependabot branches with no human looking first. Dependabot PR bodies include upstream release notes, changelogs and commit titles written by third-party package maintainers. The security-updates group matches every package (patterns: ["*"], line 19), so any package in the dependency tree can show up. This gives untrusted text a path into an agent that can write to the repo. Whether the fix agent runs npm lifecycle scripts, and which credentials it holds when it does, cannot be determined from this repo. Mitigations confirmed in the base repo: auto-merge.yml line 61 only merges PRs authored by fullsend-ai-coder[bot], and lines 130-141 only allow changes under src/ and public/, so Dependabot PRs still need a human to merge them. /fs-fix-stop (fullsend.yaml lines 63-137) lets an authorized user opt a PR out. The claim that no fullsend app has the workflows permission comes from a comment in auto-merge.yml (lines 29-30), not from app configuration that could be checked. What remains: fix-agent commits land on a branch authored by dependabot[bot], and a human merging what looks like a routine bump may not notice them. No linked issue or ADR records this trust-boundary change, while the repo's practice (auto-merge.yml lines 27 and 39-40, citing issue #11) is to record such decisions in an issue. As a process matter, this non-mechanical CI change also has no authorizing issue. PRs #63 and #64 give motivating context but are not an authorizing issue.

Suggested fix: Record the decision in a linked issue or ADR. It should cover two things: (a) Dependabot PR bodies, which contain upstream maintainer text, now feed an agent that can write to the repo; (b) whether the fix agent runs npm lifecycle scripts, and which credentials are present when it does. Consider narrowing the opt-in, for example labeling only security-update PRs through a separate Dependabot entry, or leaving the label for a human to apply. Also consider having the review agent or the human merge checklist flag Dependabot PRs that contain commits not authored by dependabot[bot].

Comment thread .github/dependabot.yml
# from its own coder bot unless this label is present
# (check-fix-eligibility.sh). `dependencies` is listed explicitly because
# `labels` replaces Dependabot's default label rather than adding to it.
labels: ["dependencies", "fullsend-fix"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] edge-case

Setting labels replaces all of Dependabot's default labels, not just dependencies. This config has two ecosystems (npm and github-actions), so by default Dependabot also adds an ecosystem label such as javascript. The PR metadata shows #63 and #64 carry it. After this change, new npm PRs will get only dependencies and fullsend-fix, and will quietly lose javascript. The comment on lines 13-14 says labels replaces 'Dependabot's default label' (singular), which understates what gets dropped. No workflow in .github/workflows/ refers to javascript, so nothing in this repo breaks. Outside filters or saved searches that rely on the label would stop matching.

Suggested fix: If the ecosystem label matters, add it explicitly: labels: ["dependencies", "javascript", "fullsend-fix"]. Otherwise, change the comment to say the default labels (plural, including the ecosystem label) are replaced.

@shairevivo

Copy link
Copy Markdown
Collaborator Author

Closing to prevent the security risk.

@shairevivo shairevivo closed this Nov 10, 2026
@shairevivo
shairevivo deleted the agent/dependabot-fix-label branch November 10, 2026 13:22
@fullsend-ai-retro

fullsend-ai-retro Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 1:23 PM UTC · Completed 1:29 PM UTC

Commit: ca8a005 · View workflow run →

Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $2.16

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #68 (label npm Dependabot PRs with fullsend-fix)

Outcome: the review agent caught the risk that mattered. No new proposals.

Timeline

  • 12:19 The maintainer opened the PR using Claude Code locally: a 5-line change to .github/dependabot.yml.
  • 12:20–12:28 Review run 42814744776 (agents v0.54.0, $2.94, ~9 min) requested changes. Findings:
    • high: a protected-path change with no authorizing issue.
    • medium: the change auto-opts every npm Dependabot PR into the fix agent. That agent holds the coder token with write access, while Dependabot PR bodies contain text from upstream maintainers. The finding came with concrete narrowing options.
    • low: setting labels silently drops the javascript ecosystem label.
  • 12:34 The maintainer added fullsend-fix. Nothing was dispatched: routing has no branch for the labeled event.
  • 13:22 The maintainer closed the PR to avoid the security risk.

Assessment

  • Review quality: strong. The medium trust-boundary finding is what drove the human decision, and the author had not anticipated it. The review checked existing mitigations (auto-merge author and path gates, /fs-fix-stop) rather than overstating the risk. It also said plainly what it could not verify: check-fix-eligibility.sh lives in fullsend-ai/fullsend. One small missed chance: that repo is public, and nothing blocked network access from the sandbox, so the review could have checked the script. It wouldn't have changed the conclusion.
  • Autonomy readiness: this is a case where the agent review added judgment that wasn't in the human-authored change, on a CI and trust-boundary file.
  • Rework: none. The PR was closed by choice.

Already tracked (no new issues filed)

Suggestion for the maintainer (not filed)

The review recommended writing the decision down. A one-line note in the upcoming AGENTS.md (PR #70) or in dependabot.yml would stop a future session from proposing this again. Something like: fullsend-fix stays human-applied on Dependabot PRs.

shairevivo pushed a commit that referenced this pull request Nov 10, 2026
tsconfig.json sets skipLibCheck, so `tsc` hides .d.ts errors caused by
the repo being held on TypeScript 4.9 (react-scripts 5 peer range).
@types/node 22.20.5 passed that way (#61) but fails with TS2502 when
lib checking is on.

- package.json: add `typecheck` (tsc --project tsconfig.typecheck.json).
- tsconfig.typecheck.json: extends tsconfig.json with
  skipLibCheck: false. build/start still use tsconfig.json unchanged.
- typecheck/ts4.9-shims.d.ts: styled-components 6.6.0 typings use the
  global NoInfer type (TS 5.4+), which made the lib-checked run fail
  on main with 7 TS2304 errors. Declare the same fallback that
  styled-components exports, loaded only by the typecheck config.
- AGENTS.md: document the TS 4.9 dependency policy, how to check
  typeScriptVersion and the ts4.9 dist-tag, the @types/node pin, the
  validation command, and the exit condition.

Verified: typecheck passes on main. With @types/node@22.20.5 plain
`tsc --noEmit` passes but `npm run typecheck` fails (TS2502). With
@types/jest@30.0.0 it fails too (TS2726). lint, build and
CI=true npm test pass.

.github/dependabot.yml is unchanged to avoid conflicting with #68;
the @types/jest guidance is recorded in AGENTS.md instead.

Closes #69

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant