بنقرة واحدة
security-fix-loop
Process open security audit issues in severity order; validate, test, fix
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Process open security audit issues in severity order; validate, test, fix
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
One tick of a CI watchdog — check main-branch GHA status; spawn an agent to fix if failing and no investigation is in flight.
One tick of the henyey mainnet monitor — checks, metrics scan, deploy, status report
Continuous always-on orchestrator for the henyey project pipeline. Each pass queries the board, central-picks up to N actionable issues by priority, and fans out parallel foreground specialist sub-agents (triage/plan/do/review-pr) with the right Claude model per stage. Owns concurrency, conflict-avoidance, CI pipelining, sibling-nit consolidation, and a self-reflection pass that files pipeline-improvement issues. Replaces scripts/project-tick-loop.sh. Use when the operator asks to "run the loop", "process the board continuously", or "keep the pipeline going".
Single-pick dispatcher primitive for the henyey project pipeline. One tick = pick one actionable issue from the project board and dispatch the right specialist sub-agent for its current state. Used for manual single picks and `--issue=` recovery; the continuous orchestrator is `/project-loop`, which owns concurrency centrally. Use when the user asks to "run a tick", "pick up an issue", or "process one board item".
Run two parallel adversarial PR reviewers and combine their verdicts with external PR reviews (GH Copilot bot, humans, other bots) and CI state into a merge decision. Agent reviewers post structured comment verdicts (since the agent is the PR author and cannot self-approve via GH native review). External CHANGES_REQUESTED reviews block merge identically to agent CHANGES_REQUESTED. Operates on issues in `in-review`. Auto-merges with --admin on all-green (after filing follow-up issues for unaddressed inline review comments, so non-critical feedback is preserved as backlog instead of dropped); bounces to `ready-for-doing` on any request-changes or CI red; blocks after 3 bounce-backs on the same code state. At the lifetime cap (6 bounces since last `## Review: Reset`) the PR enters **force-converge mode**: if CI is green, the PR auto-merges and unresolved reviewer concerns become follow-up issues; only red/pending CI at the cap still blocks. Use when invoked by /project-tick with an issue in in-review, or manuall
Audit a Rust crate's adherence to its Stellar protocol spec (spec-driven, walks every normative claim)
| name | security-fix-loop |
| description | Process open security audit issues in severity order; validate, test, fix |
| argument-hint | [--label <label>] [--dry-run] |
Parse $ARGUMENTS:
--label <label> is present, set $EXTRA_LABEL to the value. Otherwise
$EXTRA_LABEL is empty.--dry-run is present, set $DRY_RUN = true. Otherwise $DRY_RUN = false.$CURRENT_USER from:
gh api user --jq '.login'
Continuously pick the highest-severity open security audit issue authored by
the currently authenticated GitHub user and that has no assignees when
possible, process it with /security-fix, and repeat until no matching open
issues remain.
Fetch all open audit issues authored by $CURRENT_USER:
gh issue list --label security,audit --state open --search "author:@me" --json number,title,labels,assignees --limit 500
If $EXTRA_LABEL is set, add it to the label filter:
gh issue list --label security,audit,$EXTRA_LABEL --state open --search "author:@me" --json number,title,labels,assignees --limit 500
Parse the labels array for each issue to determine severity. Sort the full
list in this order:
critical labelhigh labelmedium labellow labelWithin the same severity tier, sort next by assignee status:
assignees is empty or missing (no one has claimed
the issue on GitHub). Prefer these so the loop does not compete with work
already signaled by assignees.Within the same severity and the same assignee bucket, sort by issue number ascending (lowest number first = oldest first).
If an issue has no recognized severity label, place it after low.
Store the sorted list as the queue.
Print the queue as a table:
═══ SECURITY FIX QUEUE ═══
N issues to process
# | Issue | Severity | Assignee | Title
-----|-------|----------|------------|------
1 | #28 | CRITICAL | — | [AUDIT-C1] Overlay auth bypass via...
2 | #29 | CRITICAL | @alice | [AUDIT-C2] ...
3 | #40 | HIGH | — | [AUDIT-H1] ...
...
═══════════════════════════
If $DRY_RUN = true, stop here. Do not process any issues.
If the queue is empty, print:
═══ SECURITY FIX QUEUE ═══
No open security audit issues found.
═══════════════════════════
And stop.
total = 0
fixed = 0
false_pos = 0
already = 0
skipped = 0
Repeat until the queue is empty:
Take the first issue from the queue (highest severity, unassigned before assigned, then lowest issue number within that bucket).
Print a progress header (show assignees as — when assignees is empty):
═══ SECURITY FIX [<total + 1> / <queue_size_at_start>] ═══
Issue: #<number>
Title: <title>
Severity: <SEVERITY>
Assignee: <— | @login[, @login...]>
═══════════════════════════════════════════════════════════
Run /security-fix <issue-number>.
This will do one of:
/review-fix --apply was run.After /security-fix returns, check the issue state:
gh issue view <number> --json state,labels
fixedfalse_posalreadyIncrement total.
If /security-fix did not close the issue (it's still open), this means the
fix could not be completed. Do the following:
Revert any uncommitted changes to prevent polluting the next fix:
git checkout -- .
git clean -fd
Add the needs-manual-review label to the issue:
gh issue edit <number> --add-label needs-manual-review
If the label doesn't exist yet, create it first:
gh label create needs-manual-review --description "Security fix could not be automated" --color FBCA04
Add a comment documenting why it was skipped:
gh issue comment <number> --body "$(cat <<'EOF'
## Automated Fix Skipped
The `/security-fix` automation could not complete this fix.
**Reason**: <brief explanation of what went wrong>
This issue requires manual investigation and resolution.
EOF
)"
Increment skipped.
Before picking the next issue, re-query the open issues:
gh issue list --label security,audit --state open --search "author:@me" --json number,title,labels,assignees --limit 500
(Include $EXTRA_LABEL if set.)
This is necessary because:
/review-fix --apply (invoked by /security-fix) may have found and fixed
similar issues, closing additional GitHub issues.needs-manual-review
and should be excluded from the queue).Re-sort by severity, then unassigned-before-assigned, then issue number. Filter
out any issues labeled needs-manual-review (they were already attempted and
failed).
If the re-queried list is empty, exit the loop.
After each issue, print a one-line progress summary:
Progress: <total> processed (<fixed> fixed, <false_pos> false positive, <already> already fixed, <skipped> skipped) — <remaining> remaining
After the loop exits (no more issues to process):
═══ SECURITY FIX LOOP COMPLETE ═══
Total processed: <total>
Fixed: <fixed>
False positive: <false_pos>
Already fixed: <already>
Skipped (manual): <skipped>
Remaining open: <remaining>
═══════════════════════════════════
Where <remaining> is the count from a final query:
gh issue list --label security,audit --state open --search "author:@me" --json number --limit 500 | jq length
If <remaining> > 0 and <skipped> > 0, also print:
Issues requiring manual review:
#<number> — <title>
#<number> — <title>
...
/review-fix --apply
may close related issues./security-fix
will self-assign when work starts). This reduces duplicate effort when
multiple people or agents run the loop.cargo test --all runs at the end of each
/security-fix invocation. If the full test suite is broken after a
skipped issue's partial changes, the git checkout -- . in Step 4d
restores a clean state.