-
Notifications
You must be signed in to change notification settings - Fork 0
wip #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wip #8
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [], | ||
| "deny": ["Shell(git push)", "Shell(gh pr create)", "Write(**)"] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Analyze the changes in this Git working tree and report back on tests that fall short of our testing rules. |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,58 @@ | ||||||||
| name: Testing Rules | ||||||||
|
|
||||||||
| permissions: | ||||||||
| contents: read | ||||||||
| pull-requests: write | ||||||||
|
|
||||||||
| on: | ||||||||
| pull_request: | ||||||||
|
|
||||||||
| jobs: | ||||||||
| testing-rules: | ||||||||
| runs-on: ubuntu-latest | ||||||||
| concurrency: | ||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||||
| cancel-in-progress: true | ||||||||
|
|
||||||||
| steps: | ||||||||
| - name: Checkout code | ||||||||
| uses: actions/checkout@v4 | ||||||||
|
|
||||||||
| - name: Install Cursor CLI | ||||||||
| run: | | ||||||||
| curl https://cursor.com/install -fsS | bash | ||||||||
| echo "$HOME/.cursor/bin" >> $GITHUB_PATH | ||||||||
|
|
||||||||
|
Comment on lines
+21
to
+25
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Verification inconclusivePin and verify the installer to reduce supply‑chain risk Avoid curl|bash of a moving script; pin a version and verify checksum. Example hardening: - - name: Install Cursor CLI
- run: |
- curl https://cursor.com/install -fsS | bash
- echo "$HOME/.cursor/bin" >> $GITHUB_PATH
+ - name: Install Cursor CLI (pinned)
+ run: |
+ set -euo pipefail
+ VERSION="vX.Y.Z" # pin a known-good version
+ curl -fsSL "https://cursor.com/install?version=${VERSION}" -o /tmp/cursor-install.sh
+ sha256sum /tmp/cursor-install.sh # TODO: compare against a checked-in expected sum
+ bash /tmp/cursor-install.sh
+ echo "$HOME/.cursor/bin" >> "$GITHUB_PATH"Please confirm Cursor provides a versioned installer and published checksums; if not, consider packaging or a custom action. Pin and verify the Cursor installer (supply‑chain risk) The workflow runs the upstream installer via curl | bash. (docs.cursor.com)
|
||||||||
| - name: Testing rules review | ||||||||
| env: | ||||||||
| CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }} | ||||||||
| GH_TOKEN: ${{ github.token }} | ||||||||
|
||||||||
| GH_TOKEN: ${{ github.token }} | |
| GH_TOKEN: ${{ github.token }} | |
| MODEL: gpt-4o |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gate on forks/secrets to prevent noisy failures
Skip when secrets aren’t available (PRs from forks).
Apply:
jobs: testing-rules: runs-on: ubuntu-latest + if: ${{ github.event.pull_request.head.repo.fork == false && secrets.CURSOR_API_KEY != '' }} concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true📝 Committable suggestion
🤖 Prompt for AI Agents