Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cursor/rules/security-standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- **`.env.example`** must be checked in with placeholder values and comments.
- **All env vars** accessed via `process.env.X` and validated with Zod at startup.
- **Production secrets** live ONLY in Vercel environment settings (not in code, not in CI).
- **gitleaks** runs in CI and pre-commit (configured in `.github/workflows/security.yml`).
- **gitleaks** runs in CI and pre-commit (configured in `.github/workflows/security.yml`). Placeholder tokens in docs are allowlisted via `.gitleaks.toml`.

## Input Validation

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/agent-coding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,17 @@ jobs:
# Gate the agent on CURSOR_API_KEY being present. Secrets can't be used in
# job-level `if:`, so we surface presence as an output here and skip cleanly
# (neutral, not failed) on repos that haven't set the key.
#
# The guard carries the same event filter as the job(s) it gates, so it only
# runs when an agent would actually start. A job that runs bills at least one
# full Actions minute, even for this 2-second check; a skipped job bills
# nothing. Without the filter the guard alone cost one minute per PR push,
# label or CI completion in every managed repo. Keep both filters in sync.
guard:
name: Check Cursor API key
if: >
contains(github.event.issue.labels.*.name, 'agent-task') &&
startsWith(github.event.issue.title, '[CODING]')
runs-on: ubuntu-latest
outputs:
has_key: ${{ steps.check.outputs.has_key }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/agent-devops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ jobs:
# Gate the agent on CURSOR_API_KEY being present. Secrets can't be used in
# job-level `if:`, so we surface presence as an output here and skip cleanly
# (neutral, not failed) on repos that haven't set the key.
#
# The guard carries the same event filter as the job(s) it gates, so it only
# runs when an agent would actually start. A job that runs bills at least one
# full Actions minute, even for this 2-second check; a skipped job bills
# nothing. Without the filter the guard alone cost one minute per PR push,
# label or CI completion in every managed repo. Keep both filters in sync.
guard:
name: Check Cursor API key
if: >
github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'staging' &&
contains(github.event.pull_request.labels.*.name, 'qa-passed')
runs-on: ubuntu-latest
outputs:
has_key: ${{ steps.check.outputs.has_key }}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/agent-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ jobs:
# Gate the agent on CURSOR_API_KEY being present. Secrets can't be used in
# job-level `if:`, so we surface presence as an output here and skip cleanly
# (neutral, not failed) on repos that haven't set the key.
#
# The guard carries the same event filter as the job(s) it gates, so it only
# runs when an agent would actually start. A job that runs bills at least one
# full Actions minute, even for this 2-second check; a skipped job bills
# nothing. Without the filter the guard alone cost one minute per PR push,
# label or CI completion in every managed repo. Keep both filters in sync.
guard:
name: Check Cursor API key
if: github.event.label.name == 'needs-qa'
runs-on: ubuntu-latest
outputs:
has_key: ${{ steps.check.outputs.has_key }}
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/agent-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,22 @@ jobs:
# Gate the agent on CURSOR_API_KEY being present. Secrets can't be used in
# job-level `if:`, so we surface presence as an output here and skip cleanly
# (neutral, not failed) on repos that haven't set the key.
#
# The guard carries the same event filter as the job(s) it gates, so it only
# runs when an agent would actually start. A job that runs bills at least one
# full Actions minute, even for this 2-second check; a skipped job bills
# nothing. Without the filter the guard alone cost one minute per PR push,
# label or CI completion in every managed repo. Keep both filters in sync.
guard:
name: Check Cursor API key
if: >
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' || (
github.event_name == 'pull_request' && (
github.event.pull_request.user.login == 'dependabot[bot]' ||
contains(github.event.pull_request.labels.*.name, 'dependencies')
)
)
runs-on: ubuntu-latest
outputs:
has_key: ${{ steps.check.outputs.has_key }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ci-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,18 @@ jobs:
# Gate on CURSOR_API_KEY being present. Secrets can't be used in job-level
# `if:`, so we surface presence as an output here and skip cleanly (neutral,
# not failed) on repos that haven't set the key.
#
# The guard carries the same event filter as the job(s) it gates, so it only
# runs when an agent would actually start. A job that runs bills at least one
# full Actions minute, even for this 2-second check; a skipped job bills
# nothing. Without the filter the guard alone cost one minute per PR push,
# label or CI completion in every managed repo. Keep both filters in sync.
guard:
name: Check Cursor API key
if: >
github.event.workflow_run.conclusion == 'failure' &&
github.event.workflow_run.event != 'pull_request' &&
!startsWith(github.event.workflow_run.head_branch, 'cursor/')
runs-on: ubuntu-latest
outputs:
has_key: ${{ steps.check.outputs.has_key }}
Expand Down
Loading