ci: add Graphite CI Optimizer to lint + playwright workflows - #3
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Summary
Reviewed — found 2 issue(s). This PR adds withgraphite/graphite-ci-action to the lint and playwright GitHub Actions workflows. The review focused on workflow correctness and CI/security risks in the changed files.
Findings
.github/workflows/lint.yml
- Hardcoded
graphite_tokenexposes a credential in workflow history and should be replaced with a GitHub Actions secret.
.github/workflows/playwright.yml
- Hardcoded
graphite_tokenexposes a credential in workflow history and should be replaced with a GitHub Actions secret.
Verdict
| id: check_skip | ||
| uses: withgraphite/graphite-ci-action@main | ||
| with: | ||
| graphite_token: oJHwIRpYUE6UzIAMyXGmmGm46PPrVvB7MvYnKbp70IDOg6lLnZU68zl3DMFb |
There was a problem hiding this comment.
graphite_token is hardcoded directly in the workflow. Because workflow files and PR diffs are visible in repository history, this exposes the credential to anyone with repo access and the token should be treated as compromised. Please revoke/rotate it and read the value from a GitHub Actions secret instead, for example:
graphite_token: ${{ secrets.GRAPHITE_CI_OPTIMIZER_TOKEN }}| id: check_skip | ||
| uses: withgraphite/graphite-ci-action@main | ||
| with: | ||
| graphite_token: oJHwIRpYUE6UzIAMyXGmmGm46PPrVvB7MvYnKbp70IDOg6lLnZU68zl3DMFb |
There was a problem hiding this comment.
graphite_token is hardcoded directly in the workflow. Because workflow files and PR diffs are visible in repository history, this exposes the credential to anyone with repo access and the token should be treated as compromised. Please revoke/rotate it and read the value from a GitHub Actions secret instead, for example:
graphite_token: ${{ secrets.GRAPHITE_CI_OPTIMIZER_TOKEN }}
TestingThe testing subagent classified this as a CI/workflow-only change affecting Commands run: # Read-only validation performed by the testing subagent
# - Inspected the diff for origin/main...origin/ci/graphite-ci-optimizer
# - Read changed workflow files with line numbers
# - Compared the added Graphite CI Optimizer usage against public withgraphite/graphite-ci-action documentationResult: Verdict |
Adds the Graphite CI Optimizer to both workflows so CI is skipped when Graphite determines it isn't needed, cutting runs/costs (the Playwright job is a 30-min GitHub-hosted run, so this saves the most here).
What changed
optimize_cijob inlint.ymlandplaywright.ymloutputsskipviawithgraphite/graphite-ci-action@main.build(lint) andtest(playwright) jobs now depend onoptimize_ciand only run whenskip == 'false'.Note: token is inline per Graphite's default snippet (repo is private). Can move to
${{ secrets.GRAPHITE_CI_TOKEN }}if desired.Session Details
(aside)to your comment to have me ignore it.