This project uses GitHub Actions security gates to block risky changes before public release.
File: .github/workflows/pr-security.yml
Triggers:
- Pull requests to
main - Pushes to
main
Jobs:
build-and-testnpm cinpm run buildcargo check --manifest-path src-tauri/Cargo.tomlcargo test --manifest-path src-tauri/Cargo.toml
dependency-scannpm audit --omit=dev --audit-level=high(cd src-tauri && cargo audit --json)- Blocks only on RustSec vulnerabilities.
- Non-vulnerability advisories are informational.
- Uploads:
cargo-audit.jsonnpm-audit-summary.txt
File: .github/workflows/release-security.yml
Triggers:
- Manual dispatch (
workflow_dispatch) - Tag push matching
v*
Jobs:
release-security-gates- Same build/test checks as PR workflow.
npm audit --audit-level=high(includes dev dependencies).- Rust advisory policy is the same as PR workflow.
- Uploads release audit reports.
sbom- Generates:
sbom-npm.jsonsbom-cargo.json
- Uploads SBOM artifacts.
- Generates:
signing-readiness- Fails if required Apple signing/notarization secrets are missing.
attach-release-assets- On tags only.
- If a GitHub Release already exists for the tag, uploads audit and SBOM artifacts to that release.
- If release is missing, logs and keeps artifacts as workflow outputs.
Required secrets for signing readiness:
APPLE_SIGNING_CERT_BASE64APPLE_SIGNING_CERT_PASSWORDAPPLE_SIGNING_IDENTITYAPPLE_TEAM_IDAPPLE_IDAPPLE_APP_SPECIFIC_PASSWORD
File: .github/workflows/codeql.yml
Triggers:
- Pull requests to
main - Pushes to
main - Weekly schedule (Monday 09:00 UTC)
Matrix languages:
javascript-typescriptrust
Behavior:
- Builds each language before analysis.
- Reports findings to GitHub code scanning.
- Analysis errors fail the workflow.
File: .github/dependabot.yml
Cadence:
- Weekly on Monday at 09:00 UTC.
Ecosystems:
- npm (
/) - cargo (
/src-tauri)
Both are grouped by ecosystem and labeled with:
dependenciessecurity
- Critical/high risk is blocking by default.
- PR workflow:
- Blocks on production dependency vulnerabilities.
- Blocks on RustSec vulnerabilities.
- Release workflow:
- Blocks on dependency vulnerabilities including dev dependencies.
- Blocks on RustSec vulnerabilities.
- Blocks when signing readiness secrets are missing.
- Critical/high findings:
- Immediate block and remediation before merge/release.
- Medium/low findings:
- Track in issue/ticket.
- Only block if explicitly escalated by security owner.
- Reproduce locally using parity commands.
- Patch and commit fix.
- Re-run CI checks.
- If non-blocking advisory remains, document acceptance with owner sign-off.
- Merge only after required checks are green.
Run from repo root:
npm ci
npm run build
npm audit --omit=dev --audit-level=highRun release-level npm audit (includes dev dependencies):
npm audit --audit-level=highRun Rust checks:
cargo check --manifest-path src-tauri/Cargo.toml
cargo test --manifest-path src-tauri/Cargo.toml
cargo install cargo-audit --locked
(cd src-tauri && cargo audit)Generate SBOMs locally:
npx --yes @cyclonedx/cyclonedx-npm --output-file sbom-npm.json --output-format json
cargo install cargo-cyclonedx --locked
cargo cyclonedx --manifest-path src-tauri/Cargo.toml --format json --override-filename sbom-cargoConfigure branch protection in repository settings:
- Require pull request before merging.
- Require branch to be up to date before merging.
- Disable direct pushes.
- Require these status checks:
PR Security / build-and-testPR Security / dependency-scanCodeQL / Analyze (javascript-typescript)CodeQL / Analyze (rust)
This step is configured in GitHub repository settings and is not stored in git.