| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Results 📊✅ 88635 passed | ⏭️ 6007 skipped | Total: 94642 | Pass Rate: 93.65% | Execution Time: 298m 51s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2332 uncovered lines. @@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 89.92% 89.91% -0.01%
==========================================
Files 191 191 —
Lines 23115 23115 —
Branches 7952 7952 —
==========================================
+ Hits 20785 20783 -2
- Misses 2330 2332 +2
- Partials 1307 1309 +2Generated by Codecov Action |
Sorry, something went wrong.
Add a scheduled GitHub Action that runs every Wednesday at 08:00 UTC and asks Claude Code to inspect recent master CI runs for flaky tests, then open a single combined draft PR with proposed fixes. Exits cleanly when no flakes are found. Uses a FLAKY_BOT_TOKEN PAT so the draft PR triggers CI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
This overall looks good. The one question I have is whether the references to "master" outside of any backticks/quotes will lead to potential unexpected behaviour, but otherwise don't have any concerns about the prompt
Sorry, something went wrong.
|
think the master ref is fine |
Sorry, something went wrong.
| uses: anthropics/claude-code-action@787c5a0ce96a9a6cfb050ea0c8f4c05f2447c251 # v1.0.133 | ||
| with: | ||
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| github_token: ${{ github.token }} |
There was a problem hiding this comment.
GITHUB_TOKEN with issues:write is passed to the Claude action, contradicting the stated security model
The security comment on lines 19–22 claims "The Claude step gets NO … write token," but github_token: ${{ github.token }} is explicitly passed to the action on line 112 — and that token carries issues: write (declared at the workflow level on line 43). If prompt-injection succeeds, or if a future version of claude-code-action exposes the token through any built-in GitHub tool, the LLM could open or modify issues directly, bypassing the isolation that step C is designed to enforce. Consider omitting github_token from the Claude step entirely, or binding it to a separate fine-grained token scoped to only contents: read/actions: read.
EvidenceIdentified by Warden code-review · RPC-6G7
Sorry, something went wrong.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3c8224a. Configure here.
Sorry, something went wrong.
| claude_args: | | ||
| --max-turns 40 | ||
| --model opus | ||
| --allowedTools "Read,Glob,Grep,Write,TodoWrite" |
There was a problem hiding this comment.
High Severity
The security model claims Claude "cannot exfiltrate ANTHROPIC_API_KEY or GITHUB_TOKEN" because it lacks Bash and network tools. However, the Read tool can access /proc/self/environ (a known, documented Claude Code issue with multiple open bugs), which contains both secrets as environment variables. A prompt injection in CI logs could instruct Claude to read that file and embed the extracted ANTHROPIC_API_KEY into flaky-issue-body.md via the Write tool. Step C then publishes that file content as a public GitHub issue, completing the exfiltration without any shell or network access.
Additional Locations (1)Reviewed by Cursor Bugbot for commit 3c8224a. Configure here.
Sorry, something went wrong.
There was a problem hiding this comment.
well we just want to try this for now, seems like a known thing
Sorry, something went wrong.
## Summary Adds a weekly scheduled workflow (`.github/workflows/flaky-test-detector.yml`) that runs **every Wednesday at 08:00 UTC** (also manually via `workflow_dispatch`). It: 1. **(shell step)** Inspects the last ~30 `test.yml` / `ci.yml` runs on `master` via `gh run list` / `gh run view --log-failed` and writes the failed logs to `./ci-logs/`. 2. **(Claude step)** Classifies genuinely flaky tests (intermittent failures, timing/ordering/network/global-state signals) vs. real regressions and infra noise — capped at the 5 clearest, ranked by impact — and writes a summary to `flaky-issue-body.md`. 3. **(shell step)** Opens **one summary issue** from that file listing each flaky test with its node ID, evidence (run IDs / failure frequency), a one-line root cause, and a short suggested fix. It does **not** edit code or open a PR; the output is purely an informational issue for humans to triage. ## Security CI failure logs contain tracebacks and stdout controlled by whoever landed the commit, so they're untrusted input. The "treat logs as data" prompt is treated as defeatable; the real protections are mechanical and keep the **log-reading agent away from any credentialed write channel**: - **The three steps are kept separate on purpose.** Log fetching (step 1) and issue creation (step 3) are plain non-LLM shell steps; only they touch a token. - **The Claude step has no shell and no write token.** Its `--allowedTools` is `Read,Glob,Grep,Write,TodoWrite` — no `Bash`. With no subprocess and no network tool it cannot run `gh`/`curl`/`printenv`, so a prompt injection in the logs cannot exfiltrate `ANTHROPIC_API_KEY` or `GITHUB_TOKEN`, nor create an issue directly. It can only read the pre-fetched logs and write the issue body to a file. - **`issues: write` lives only in the final shell step**, which never ingests untrusted log text. All other permissions are read-only. This avoids the single-step `gh` pitfall: giving the untrusted-data agent a `gh` write channel is itself an exfiltration vector (`gh issue create --body "$ANTHROPIC_API_KEY"`), and the subprocess env-scrub feature can't fix it because it's all-or-nothing and would break `gh` auth. ## Required setup before this runs One repo/org secret is needed: - **`ANTHROPIC_API_KEY`** — Anthropic API key for the model. The workflow uses the default `GITHUB_TOKEN` (scoped to `contents: read`, `actions: read`, `issues: write`) — no PAT required. Optionally create a `flaky-test` label so the issues are grouped; the workflow falls back to no label if it doesn't exist. --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Summary
Adds a weekly scheduled workflow (.github/workflows/flaky-test-detector.yml) that runs every Wednesday at 08:00 UTC (also manually via workflow_dispatch). It:
It does not edit code or open a PR; the output is purely an informational issue for humans to triage.
Security
CI failure logs contain tracebacks and stdout controlled by whoever landed the commit, so they're untrusted input. The "treat logs as data" prompt is treated as defeatable; the real protections are mechanical and keep the log-reading agent away from any credentialed write channel:
This avoids the single-step gh pitfall: giving the untrusted-data agent a gh write channel is itself an exfiltration vector (gh issue create --body "$ANTHROPIC_API_KEY"), and the subprocess env-scrub feature can't fix it because it's all-or-nothing and would break gh auth.
Required setup before this runs
One repo/org secret is needed:
The workflow uses the default GITHUB_TOKEN (scoped to contents: read, actions: read, issues: write) — no PAT required.
Optionally create a flaky-test label so the issues are grouped; the workflow falls back to no label if it doesn't exist.