Repository navigation
Description
What happened
- 2026-11-10 15:18: the code agent opened shairevivo/react-shopping-cart#74 for issue ci(functional-tests): fix fullsend version check command #73, removing a GitHub star button. As part of the change it edited the
Content-Security-Policyresponse header in rootfirebase.json(Firebase Hosting config): it removed a host fromscript-srcand deleted theframe-srcdirective. - 15:30: the review agent (resolved from
fullsend-ai/agents@v0.54.0, review run 42843253239) produced a PR risk assessment of low (1/5), describing the PR as having no protected paths, no dependency changes and no security sensitivity. It then approved with zero findings and addedready-for-merge. - The repo's
SECURITY.mdexplicitly lists the deploy configuration (firebase.json) as in security scope, and lists CSP among the existing controls. - 16:01: the repo owner merged #75, which adds root
firebase.jsonto the repo's auto-merge path allowlist. From now on, review-agent approval alone is the merge gate for agent edits to this file's CSP and other response headers. The owner noted this trade-off in the PR body. - Source inspection of v0.54.0 shows how the low score came about:
skills/pr-risk-assessment/scripts/risk-tier1.sh(L40-45) computes security sensitivity from a hard-codedSECURITY_PATTERNSlist of directory names (mint/ auth/ oidc/ rbac/ permissions/ secrets/ crypto/ token/ tokens/ trust/ policies/). There is no override, and a root config file can never match.skills/pr-risk-assessment/SKILL.mdstep 8 (L243-262) treats "no protected paths, no security-sensitive files, no dependency changes" as reasons the score must be 1.skills/pr-review/sub-agents/security.mdhas no guidance on CSP, CORS or security response headers.security-triage.mdhas no hosting-config heuristics.- No skill reads the target repo's
SECURITY.md. - These files are unchanged on
mainas of 2026-11-10.
What could go better
The risk tier and security triage depend only on directory names, so security controls that live in root config files are invisible to them. This covers CSP and other security headers in firebase.json, netlify.toml, vercel.json, _headers, staticwebapp.config.json or nginx configs, and CSP <meta> tags in index.html.
On #74 the edit happened to tighten the CSP, so no harm was done. The same pipeline would also have scored a CSP that adds 'unsafe-eval' or a wildcard script host as "no security sensitivity, 1/5".
This repo now auto-merges agent PRs touching firebase.json on review approval, so the gap has a direct path to production. This combination of repo-level automation trust and blind spots in agent-level detection will recur in any repo that widens auto-merge scope.
Confidence:
- High that the fixed pattern list caused the 1/5 score; the skill's step 8 prescribes it.
- Moderate on the best fix shape. Adding
firebase.jsontoREVIEW_PROTECTED_PATHSvia a harness override would force human approval on every such PR. That conflicts with the owner's explicit choice to auto-merge this file. The repo needs a sensitivity signal (higher risk tier and a mandatory security pass), not a protected block. - Tension: Review triage step 3b should distinguish security-relevant config from operational config #1224 asks to narrow the broad "config files" security trigger. This proposal is about recognising security-control config specifically, which should be compatible.
Proposed change
In fullsend-ai/agents:
-
Per-repo security-sensitive paths. Add a
REVIEW_SECURITY_SENSITIVE_PATHSenv (or similar), overridable via harnessbase:composition likeREVIEW_PROTECTED_PATHS. Haverisk-tier1.shmerge it withSECURITY_PATTERNS. Support exact file paths and globs, not just directory prefixes, sofirebase.jsoncan match. -
Default hosting/security-header patterns. Extend the defaults to cover common security-header config files:
firebase.json,netlify.toml,_headers,vercel.json,staticwebapp.config.json, andnginx*.conf. Alternatively, add a lightweight content check inrisk-tier1.shthat counts a file as security-sensitive when its diff touches lines matchingContent-Security-Policy|Strict-Transport-Security|X-Frame-Options|Access-Control-Allow|Permissions-Policy|Referrer-Policy. The content check also catches CSP<meta>tags in HTML. -
Read
SECURITY.mdscope. Inskills/pr-risk-assessment/SKILL.md(and the review security sub-agent), instruct the agent to read the target repo'sSECURITY.md/ threat-model doc if present. Changes to files that doc declares in scope must not be described as "no security sensitivity", and must get a security sub-agent pass. -
CSP guidance for the security sub-agent. In
skills/pr-review/sub-agents/security.md, add a short section on response headers and CSP:- Loosening (new sources,
unsafe-*, wildcards, removed directives that fall back to a weakerdefault-src) is a finding. - Tightening should be verified not to break still-used resources.
- Loosening (new sources,
-
Auto-merge widening guidance. In the same sub-agent, add guidance that workflow changes widening an auto-merge or merge-gate path allowlist should be called out. The review should name what security-relevant files the change makes bot-mergeable.
This refines #1893, which adds .fullsend/ to the protected list. It addresses the same root issue (a fixed path list misses repo-specific sensitive files) for the security-sensitive signal, and adds a per-repo extension point so each new path class doesn't need its own upstream change.
Validation criteria
- Eval cases. Add two review evals:
- A PR that only edits the CSP header in
firebase.jsonto add'unsafe-eval'must getSECURITY_SENSITIVE_COUNT >= 1, a risk score of at least 2, and a security finding. - A CSP-tightening edit must get
SECURITY_SENSITIVE_COUNT >= 1but may still approve.
- A PR that only edits the CSP header in
- Per-repo override. Setting the override on a test repo to include an arbitrary root file makes
risk-tier1.shcount it. - Live sample. Over the next 5 agent PRs across fullsend-managed repos that touch a hosting-header config or a
SECURITY.md-scoped file, none should have a risk assessment stating "no security sensitivity".
Related issues checked
Searched: risk assessment CSP; security sensitive paths; protected paths config; SECURITY.md review; content security policy; risk assessment security sensitivity; pr-risk-assessment; protected path; security headers; firebase.json; CSP; hosting config security; SECURITY.md scope; risk-tier1 security-sensitive
Considered: #1893, #1224, #535, #1445, #1077, fullsend-ai/fullsend#2745, fullsend-ai/fullsend#4698
- Add .fullsend/ (per-repo harness overlays and config) to the default REVIEW_PROTECTED_PATHS #1893 (open): adds .fullsend/ to protected paths. Same mechanism, different path class and signal (protected, not security-sensitive). This proposal refines it with a per-repo extension point.
- Review triage step 3b should distinguish security-relevant config from operational config #1224: narrows the config-file security trigger. Compatible, not overlapping.
- Review agent should escalate security sub-agent depth based on PR labels and file-path signals #535, Small-PR scope_constraint (step 3e) has no path-pattern override for governance/security-critical paths #1445: security review depth and scope overrides. Adjacent.
- Risk assessment skill should elevate baseline risk for ADR PRs #1077: ADR risk baseline. Different file class.
- fullsend#2745: reads AGENTS.md to calibrate protected paths (false positives). Similar doc-reading idea, different goal.
- fullsend#4698: risk score umbrella.
Generated by retro agent from fullsend-ai/react-shopping-cart#75
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity