Repository navigation
Security Engineer: a team member that sweeps, proves, fixes, and keeps holes shut - #625
Merged
Merged
Conversation
… shut A new team member that sweeps an app for security holes and fixes the security architecture, plus the board support that makes a fix stick. Role (ROLE_SECURITY): follows untrusted input from where it enters to where it is used (SQL, shell, eval, paths, HTML, fetched URLs, deserializers), then secrets, access checks, unsafe defaults and crypto. A finding is a hole it demonstrated; each is filed as one task with the attack as its criteria and its kind as the cause. It fixes the kind at the boundary (one data layer that parameterizes, one escaping helper, secrets from the environment) and submits with the attack before and after. Findings on the board: task create takes "cause" (the desktop's POST too). The board keeps the project as the finding was filed, outside the workspace like a submission's snapshot. A rule for that cause is then proven against the defect itself and the accepted fix, so one fixed hole is enough, where a reject cause needs two rejects. When a finding is accepted, whoever filed it (or the leads, for the operator's) is told to draft the check, once per cause. Templates: sec joins software-team on the default tier, and the kickoff hands it a sweep that waits on the build. A new "security" template (Foreman + Security Engineer) sweeps a project that already exists. Tests: team_board_tests TestFindings, teams_tests (roster, tier, kickoff, template), desktop_routes_tests (finding over HTTP). Each behaviour was revert-checked: 20 of 20 caught. Replay bench: 29 calls, handoffs under a second, request bytes 947,030 -> 951,641 (+0.49%, the longer task and rule schema text). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KYD1zZPD7GuM8pF1btwi2U
… a replay The security team (Foreman + Security Engineer) was run live through the relay against a seeded notes app with three real holes. It found, demonstrated, fixed and verified all three. Three checks were proven on the first draft against the app as each finding was filed, and each then caught a new instance of its kind elsewhere in the app. bench/teamboard/LIVE.md, run 4. Fixed from the run: - The role said grep_files "finds the sinks"; it matches one literal string, and the agent sent it a regex. Then shell grep -E was refused for the word eval in its pattern. The role now gives the one grep -rnEi call that works and searches eval( with grep_files; a test runs the role's command through ShellAllowed. The denylist is unchanged. - /v1/decisions and /v1/needs-you were 404 in a running gateway: IsDesktopPath never listed them, and the route tests call the desktop router directly. The desktop's Needs you could not show or answer an agent's question or a proven rule. Added, with a test that walks every route the router answers through that list. - rule list shows each cause's findings; the desktop's board rows show "(finding: <kind>)". Bench: make bench-teamboard replays both runs. security-notes.json carries the seeded app and replays in recorded order (a check can only be proven after the fix is accepted). It checks that the board is done, the app's tests pass and three proven rules are waiting. It stops with STALLED when a recorded wake never comes: with the finding proof undone it stops at answer 38. Revert-checks: 25 of 25 caught. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KYD1zZPD7GuM8pF1btwi2U
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
A new team member that sweeps an app for security holes and fixes the security architecture, plus board support that keeps a fixed hole fixed. It was run live end to end, and two bugs the run found are fixed here: one in the role, and one in the gateway's routing that predates this work.
The Security Engineer
ROLE_SECURITY). It follows untrusted input from where it enters to where it is used: SQL built from strings, shell commands,eval/exec, paths joined from input, HTML built from input, URLs fetched on a user's say, deserializers. Then it checks secrets, access control, unsafe defaults and crypto. It files only holes it demonstrated: the input sent and what came back. Each is one task with the attack as its criteria and its kind as the cause. It fixes the kind at the boundary (parameterized queries, one path allow-list, secrets from the environment), adds a test that sends the attack, and submits with the attack before and after as evidence.secjoinssoftware-teamon the default tier, notfast, and the kickoff hands it a "Security sweep" task that waits on the build.securitytemplate (Foreman + Security Engineer) sweeps a project that already exists:pasclaw team up security --project <name>.Findings on the board
task action=create … cause="sql-injection"files the task as a finding. The desktop'sPOST /v1/projects/<p>/taskstakescausetoo.rule action=draftcan prove a check against that snapshot (it must fail there) and the accepted fix (it must pass). One fixed finding is enough; a reject cause needs two rejects.rule listshows each cause's findings, and the desktop's board rows show(finding: <kind>).Live run (bench/teamboard/LIVE.md, run 4)
The
securityteam was run through the relay provider, with both agents played from their role prompts, against a seeded notes app with three real holes:../notes.pyreturned the source) and a live API key in the source.Fixed from the run:
/v1/decisionsand/v1/needs-youwere 404 becauseIsDesktopPathnever listed them, so the desktop could not show or answer an agent'sask_operatorquestion or a proven rule. This predates this PR; the route tests call the desktop router directly, which hid it. Fixed, and a new test walks every route the desktop router answers throughIsDesktopPath.shell_exec grep -Ewas refused because the pattern contained the denylisted tokeneval. The denylist is unchanged. The role now gives onegrep -rnEicall and searcheseval(withgrep_files, and a test runs the role's command throughShellAllowed.Tests and benches
team_board_testsTestFindings covers the snapshot, receipt, proof pair, wording, notices, once-per-cause and an operator-filed finding.teams_testscovers the roster, tier, kickoff, template, the sweep command and the denylist.desktop_routes_testscovers a finding over HTTP and that every route is reachable.make bench-teamboardnow replays two recorded runs:task/ruleschema text.security-notes.json: 39 answers in 5.2 s, replayed in recorded order across agents. It checks that the board is done, the app's tests pass and three proven rules are waiting. If a recorded wake never comes it stops withSTALLEDafter 45 s instead of hanging.make testpasses on FPC 3.2.2. Not compiled with Delphi (dcc64 is not available in this environment).Docs:
docs/teams.md(template table, a Security section, Findings, Needs-you routing note),docs/team-board-plan.md,docs/desktop.md,docs/security.md,docs/agent-bench-plan.md,bench/teamboard/LIVE.md.Generated by Claude Code