Repository navigation
Description
🧪 Experiment Campaign: daily-security-red-team
Workflow file: .github/workflows/daily-security-red-team.md
Selected dimension: reasoning_depth
Triggered by: ab-testing-advisor on 2026-05-12
Background
The daily-security-red-team workflow performs a deep security scan of actions/setup/js and actions/setup/sh using the Claude engine with a highly prescriptive, multi-phase prompt (7 rotating analysis techniques, ~500 lines). Because the agent already spends up to 60 minutes on each run, the key open question is whether the added cost of deep iterative reasoning (where the agent explicitly re-evaluates preliminary findings before reporting) delivers meaningfully better true-positive rates compared to a single-pass scan — or whether single-pass already captures all actionable findings at a lower cost.
Hypothesis
- H0 (null): Iterative multi-pass reasoning does NOT improve finding quality (precision × recall) compared to single-pass analysis.
- H1 (alternative): Iterative reasoning reduces false-positive rate by ≥20% or increases confirmed true-positives by ≥15%, at the cost of ≤30% more run time and token usage.
Experiment Configuration
Add the following experiments: block to the workflow frontmatter:
experiments:
reasoning_depth:
variants: [single_pass, iterative]
description: "Compare single-pass vs. iterative (re-evaluation) security analysis to measure false-positive rate, true-positive rate, and cost"
hypothesis: "H0: no change in finding quality. H1: iterative reduces false-positive rate by >=20% at <=30% token overhead"
metric: false_positive_rate
secondary_metrics: [run_duration_ms, issues_created, token_count]
guardrail_metrics:
- name: run_success_rate
direction: min
threshold: 0.9
- name: empty_output_rate
direction: max
threshold: 0.05
min_samples: 30
weight: [50, 50]
start_date: "2026-05-12"
analysis_type: proportion_test
tags: [security, cost-efficiency, quality]
issue: 0Variant descriptions:
single_pass: The agent performs each analysis technique once, reports findings directly. Current default behavior — fast, low token cost.iterative: After completing each technique, the agent reviews preliminary findings, discards low-confidence ones with a written rationale, then re-runs targeted checks on remaining candidates. Expected: fewer false positives, higher confidence findings, ~20–30% more tokens.
Workflow Changes Required
Add a conditional reasoning instruction block at the end of Phase 4: Execute Security Analysis in the workflow body. The {{#if}} block compiles to a runtime env-var check:
Before (end of Phase 4, after all technique blocks):
## Phase 5: Compile and Report FindingsAfter:
## Phase 4b: Iterative Re-Evaluation (variant: iterative only)
{{#if experiments.reasoning_depth iterative}}
Before proceeding to Phase 5, perform a **second-pass validation** of every finding collected so far:
1. For each finding in `FINDINGS[]`, re-read the exact file and line cited.
2. Determine if the finding is a **confirmed true positive**, a **false positive**, or **needs more investigation**.
3. Write a one-sentence justification for each decision.
4. Remove false positives from `FINDINGS[]` and log them to `$CACHE_DIR/dismissed-findings-${TIMESTAMP}.json`.
5. For "needs more investigation" items, run one additional targeted check (e.g., trace data flow or check call graph).
6. Update `$CURRENT_SCAN` with `"re_evaluation_complete": true` and `"dismissed_count": <N>`.
{{else}}
<!-- single_pass: skip re-evaluation, proceed directly to Phase 5 -->
{{/if}}
## Phase 5: Compile and Report FindingsSuccess Metrics
| Metric | Type | Target |
|---|---|---|
false_positive_rate (issues created but later closed as invalid) |
Primary | iterative ≤ baseline × 0.80 |
run_duration_ms |
Secondary | iterative ≤ single_pass × 1.30 |
issues_created per run |
Secondary | observe (not a target — quality over quantity) |
run_success_rate |
Guardrail | Must stay ≥ 90% for both variants |
empty_output_rate |
Guardrail | Must stay ≤ 5% for both variants |
Statistical Design
- Variants:
single_pass(control),iterative(treatment) - Assignment: Round-robin via
gh-awexperiments runtime (cache-based) - Minimum runs per variant: 30 (for 80% power to detect a 20% reduction in false-positive rate at α=0.05 using a two-proportion z-test)
- Expected experiment duration: ~60 days at 1 run/day (30 runs per variant)
- Analysis approach: Two-proportion z-test (
proportion_test) on false-positive rate; Mann-Whitney U onrun_duration_ms
Implementation Steps
- Add
experiments:section to frontmatter (replace0inissue:with this issue number) - Add
{{#if experiments.reasoning_depth iterative}}conditional block before Phase 5 - Run
gh aw compile daily-security-red-teamto regenerate lock file - Monitor experiment artifact uploaded per run to
/tmp/gh-aw/experiments/state.json - After 30+ runs per variant, compare false-positive rates using a two-proportion z-test
- Document findings and promote winning variant
Infrastructure note: All three schema fields checked by the
ab-testing-advisorgate (analysis_type,tags,notify) are already fully implemented in bothpkg/workflow/compiler_experiments.goandactions/setup/js/pick_experiment.cjs. No infrastructure sub-issue is needed.
References
- A/B Testing in gh-aw
- Workflow file:
.github/workflows/daily-security-red-team.md
Generated by Daily A/B Testing Advisor · ● 4.9M · ◷
- expires on May 26, 2026, 11:13 AM UTC
Activity
github-actions commentedon Jun 7, 2026
reasoning_depthThe following guardrail metric failed:
run_success_rateexpected>=0.9, got0.727for variantsingle_pass(n=11 runs)iterativeis passing:1.00✅Note: Statistical significance detected (p=0.032) but guardrail failure takes precedence.
Recommendation: ABANDON —
single_passvariant has unacceptable failure rate. Consider investigating root cause before re-running.View the full report: Daily Experiment Report — 2026-06-07
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
proxy.golang.orgreleaseassets.githubusercontent.comSee Network Configuration for more information.
github-actions commentedon Jun 20, 2026
reasoning_depthThe following guardrail metric failed in the last 30-run analysis window:
run_success_rateexpected>=0.90, got0.857for variantsingle_passThe
iterativevariant is performing at 100% success rate, whilesingle_passis below the reliability threshold.Neither variant has yet reached
min_samples=30(single_pass: 17/30, iterative: 22/30), but the guardrail failure onsingle_passis a warning signal.Recommendation: ABANDON — investigate whether the
single_passreasoning mode has reliability issues before continuing the experiment.View the full report: Daily Experiment Report — 2026-06-20
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
proxy.golang.orgreleaseassets.githubusercontent.comSee Network Configuration for more information.
github-actions commentedon Jul 7, 2026
🧪 Experiment Update — 2026-07-07
Experiment:
reasoning_depth| Workflow:dailysecurityredteamRecommendation: EXTEND
iterative(ctrl)single_passStatistical test (success rate): p = 0.5732 (not significant yet)
Rationale: Need more data; some variants below min_samples=30
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
proxy.golang.orgreleaseassets.githubusercontent.comSee Network Configuration for more information.
github-actions commentedon Jul 7, 2026
🧪 Experiment Update — 2026-07-07
Experiment:
reasoning_depth| Workflow:dailysecurityredteamRecommendation: EXTEND
iterative(ctrl)single_passStatistical test (success rate): p = 0.5732 (not significant yet)
Rationale: Need more data; some variants below min_samples=30
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
proxy.golang.orgreleaseassets.githubusercontent.comSee Network Configuration for more information.
github-actions commentedon Aug 25, 2026
🧪 Experiment
reasoning_depthis ready for analysis!All variants have reached the minimum sample size of
30runs:iterative: 64/30
single_pass: 41/30
View the latest statistics in the Daily Experiment Report discussion (posted 2026-08-25).
github-actions commentedon Aug 27, 2026
🧪 Experiment
reasoning_depthis ready for analysis!All variants have reached the minimum sample size of
30runs:iterative: 66/30
single_pass: 41/30
Core decision: EXTEND (
guardrail_unsupported) — mandatory guardrail is not backed by a supported metric observation.View the latest statistics in the Daily Experiment Report discussion.
github-actions commentedon Sep 6, 2026
🧪 Experiment
reasoning_depthis ready for analysis!All variants have reached the minimum sample size of
30runs:View the latest statistics in the Daily Experiment Report.
github-actions commentedon Sep 9, 2026
🧪 Experiment
reasoning_depthis ready for analysis!All variants have reached the minimum sample size of
30runs:iterative: 72/30
single_pass: 48/30
Core decision so far: EXTEND (
guardrail_unsupported) — mandatory guardrail "run_success_rate" is not backed by a supported metric observationView the latest statistics in the Daily Experiment Report.
github-actions commentedon Sep 10, 2026
🧪 Experiment
reasoning_depthis ready for analysis!All variants have reached the minimum sample size of
30runs:iterative: 73/30
single_pass: 48/30
View the latest statistics in the Daily Experiment Report discussion posted today (2026-09-10).
github-actions commentedon Sep 12, 2026
🧪 Experiment update:
reasoning_depthis READY for analysisAll variants have reached
min_samples(30) in thedailysecurityredteamworkflow.Core decision: EXTEND (
guardrail_unsupported)Variants:
iterative: 75 runs assignedsingle_pass: 48 runs assignedSee the [Daily Experiment Report discussion] for full descriptive statistics and factorial diagnostics (posted in this run).
github-actions commentedon Sep 14, 2026
🧪 Experiment
reasoning_depthis ready for analysis!All variants have reached the minimum sample size of
30runs:single_pass: 49/30
iterative: 76/30
View the latest statistics in the Daily Experiment Report (discussion posted 2026-09-14).
github-actions commentedon Sep 17, 2026
🧪 Experiment status: READY for analysis (no verdict yet)
All variants reached
min_samplesand the balance test passed, but the core decision engine returned EXTEND (reason codeguardrail_unsupported): mandatory guardrail is not backed by a supported metric observation.See the full Daily Experiment Report discussion for tables, charts, and cross-repo decision-pipeline context (run 35196671921).
Automated status update — no action required unless you want to help unblock the metric/guardrail pipeline gap noted in the report.