Skip to content

Commit 79fc81c

Browse files
authored
Require evidence before reporting red-team security findings (#67542)
1 parent b075f64 commit 79fc81c

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

‎.github/workflows/daily-security-red-team.lock.yml‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/daily-security-red-team.md‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ while IFS= read -r file; do
315315

316316
# Pattern 1: Secret exfiltration
317317
if grep -nE '(process\.env\.|os\.getenv|ENV\[)[^;]*\.(post|fetch|axios|request|curl|wget)' "$file" > /tmp/gh-aw/agent/pattern.txt; then
318-
echo "⚠️ Potential secret exfiltration in $file"
319-
FINDINGS+=("SECRET_EXFIL:$file:$(head -1 /tmp/gh-aw/agent/pattern.txt | cut -d: -f1)")
318+
echo "⚠️ Potential secret egress candidate in $file"
319+
FINDINGS+=("SECRET_EXFIL_CANDIDATE:$file:$(head -1 /tmp/gh-aw/agent/pattern.txt | cut -d: -f1)")
320320
fi
321321

322322
# Pattern 2: Eval/exec with user input
@@ -430,8 +430,8 @@ while IFS= read -r file; do
430430

431431
# High entropy might indicate obfuscation
432432
if [ "$ENTROPY" -gt 70 ]; then
433-
echo "⚠️ High entropy detected in $file (entropy: $ENTROPY)"
434-
FINDINGS+=("HIGH_ENTROPY:$file:0:entropy=$ENTROPY")
433+
echo "⚠️ High entropy candidate detected in $file (entropy: $ENTROPY)"
434+
FINDINGS+=("HIGH_ENTROPY_CANDIDATE:$file:0:entropy=$ENTROPY")
435435
fi
436436

437437
# Check for long hex/base64 strings
@@ -587,6 +587,16 @@ Before proceeding to Phase 5, perform a **second-pass validation** of every find
587587
<!-- single_pass: skip re-evaluation, proceed directly to Phase 5 -->
588588
{{/if}}
589589

590+
#### Phase 4c: Evidence Validation (all scan variants)
591+
592+
Before Phase 5, validate every candidate in `FINDINGS[]`, including in the `single_pass` variant. The iterative second pass is additional analysis, not a substitute for these checks:
593+
594+
1. Verify that each cited path exists and that its line number is in range and points to the behavior being reported. Do not treat imports, comments, type declarations, or test fixtures alone as evidence of a production vulnerability.
595+
2. Treat regex matches, suspicious keywords, entropy scores, and long encoded strings as leads only. A heuristic match does not establish malicious behavior.
596+
3. For any `SECRET_EXFIL_CANDIDATE`, identify the sensitive value source and the outbound network sink, then trace the same value from source to sink. Cite the exact source and sink lines and explain the data flow. An environment-variable read, a network call, or high entropy on its own is insufficient. Promote the candidate to `SECRET_EXFIL` only when this path is verified; otherwise remove it from `FINDINGS[]` and record the reason in `$CACHE_DIR/dismissed-findings-${TIMESTAMP}.json`.
597+
4. Apply the same evidence standard to other finding types: retain only findings supported by the cited code and its behavior. If a candidate cannot be verified, do not report it as a confirmed issue.
598+
5. Ensure all remaining entries in `FINDINGS[]` are confirmed, correctly cited findings before running forensics or generating remediation tasks. If none remain, use the no-findings path in Phase 8.
599+
590600
#### Phase 5: Compile and Report Findings
591601

592602
```bash
@@ -658,7 +668,7 @@ if [ ${#FINDINGS[@]} -gt 0 ]; then
658668
659669
### 📋 Executive Summary
660670
661-
The daily security red team scan has detected **${#FINDINGS[@]}** potential security issues in the \`actions/setup/js\` and \`actions/setup/sh\` directories using the **$TECHNIQUE** technique.
671+
The daily security red team scan has detected **${#FINDINGS[@]}** validated security findings in the \`actions/setup/js\` and \`actions/setup/sh\` directories using the **$TECHNIQUE** technique.
662672
663673
<details>
664674
<summary><b>🔍 View Detailed Findings</b></summary>

0 commit comments

Comments
 (0)