Repository navigation
fix: stop passing secrets to Upptime actions and pin them by SHA - #6
Conversation
GitHub flagged Uptime CI as possibly malicious and blocked it: three workflows passed `toJson(secrets)` to a third-party action, and this public repository can read the DOS org secrets, including CLAUDE_CODE_OAUTH_TOKEN. The site config uses no secret placeholders, so nothing needs them. - Remove SECRETS_CONTEXT from uptime, response-time and setup. - Pin actions/checkout, upptime/uptime-monitor, peaceiris/actions-gh-pages and benc-uk/workflow-dispatch to commit SHAs. - Give each workflow only the token permissions it needs. - Drop the update-template step from Setup CI and run it on master only, so the hardening is not regenerated away. Update Template CI and Updates CI (which run upstream @master) stay disabled. - Raise the rate.vn slow thresholds (health 15 s, API 10 s) for Vercel cold starts, per review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the .upptimerc.yml configuration file to increase the maxResponseTime thresholds for the 'Rate.vn Health' and 'Rate.vn API' sites to 15000 ms and 10000 ms, respectively, to accommodate Vercel cold starts. I have no feedback to provide.
There was a problem hiding this comment.
Code Review
This pull request updates the Upptime configuration in .upptimerc.yml by increasing the maxResponseTime thresholds for the 'Rate.vn Health' and 'Rate.vn API' sites to 15000 ms and 10000 ms respectively, to accommodate Vercel cold starts. The accompanying comment was also updated to explain this change. There are no review comments to address, and I have no additional feedback to provide.
Both run the same status update as Uptime CI, which opens, comments on and closes incident issues after committing history. Without issues: write a status change seen by these runs would be committed but never reported. Review finding on #6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review record. An independent subagent reviewer checked head 1e1611a. What it verified:
It also found that the repo's default token permission is One P2 finding: P3 notes, accepted with no change:
|
GitHub blocked the first Uptime CI run since April with "this workflow file may be malicious".
The flag was justified:
toJson(secrets)to the third-party actionupptime/uptime-monitor, pinned only by tag;CLAUDE_CODE_OAUTH_TOKEN;.upptimerc.ymluses no$SECRETplaceholders, so nothing needs them.Changes:
SECRETS_CONTEXT: ${{ toJson(secrets) }}fromuptime.yml,response-time.ymlandsetup.yml.actions/checkout,upptime/uptime-monitor,peaceiris/actions-gh-pagesandbenc-uk/workflow-dispatchto commit SHAs.permissionsper workflow:contents: writeeverywhere;issues: writefor Uptime CI;actions: writefor Setup CI's workflow dispatch.update-templatestep is gone;masteronly, so feature-branch pushes no longer start it.@master./api/healthto 15 s,/api/v1/rate/statsto 10 s. Measured Vercel cold starts were 4-8.5 s.Checks:
toJson(secrets)remains;Approved by JOY in chat on 2026-10-24. Separately, JOY may restrict the org secrets to the private repositories that need them.
🤖 Generated with Claude Code
📌 TL;DR
This PR hardens the Upptime CI workflows by pinning GitHub Actions to specific commit SHAs, removing the
SECRETS_CONTEXTenvironment variable to prevent secret leakage, and enforcing least-privilegepermissionsscopes. It also adjusts themaxResponseTimethresholds in.upptimerc.ymlto accommodate Vercel cold start latency.🎯 Type of Change
🔍 Changes Walkthrough
.github/workflows/graphs.ymlactions/checkoutandupptime/uptime-monitorto commit SHAs. Addedpermissions: contents: write. RemovedSECRETS_CONTEXTenv var. Updated header comments to reflect manual hardening..github/workflows/response-time.ymlpermissions: contents: write. RemovedSECRETS_CONTEXTenv var. Updated header comments..github/workflows/setup.ymlpermissions: contents: write, actions: write. Removed theupdate-templatestep to prevent overwriting hardened workflows. RemovedSECRETS_CONTEXTenv var. Restricted push trigger tomasterbranch..github/workflows/site.ymlactions/checkout,upptime/uptime-monitor, andpeaceiris/actions-gh-pagesto commit SHAs. Addedpermissions: contents: write. RemovedSECRETS_CONTEXTenv var. Updated header comments..github/workflows/summary.ymlpermissions: contents: write. RemovedSECRETS_CONTEXTenv var. Updated header comments..github/workflows/uptime.ymlpermissions: contents: write, issues: write. RemovedSECRETS_CONTEXTenv var. Updated header comments..upptimerc.ymlmaxResponseTimeforRate.vn Healthfrom 10s to 15s andRate.vn APIfrom 5s to 10s to account for Vercel cold start latency (4-8.5s).📊 Architectural Flow
flowchart TD subgraph "CI Trigger" A[Push to master / Dispatch] --> B{Workflow Type} end subgraph "Hardened Workflows" B -->|Setup| C[Setup CI] B -->|Uptime| D[Uptime CI] B -->|Response Time| E[Response Time CI] B -->|Graphs| F[Graphs CI] B -->|Site| G[Static Site CI] B -->|Summary| H[Summary CI] end subgraph "Security Hardening" C & D & E & F & G & H --> I[Pinned Action SHAs] C & D & E & F & G & H --> J[Least Privilege Permissions] C & D & E & F & G & H --> K[No SECRETS_CONTEXT] end subgraph "Upptime Execution" I & J & K --> L[upptime/uptime-monitor] L --> M[Update Status / Generate Assets] end subgraph "Deployment" M --> N[GitHub Pages / README] end