Skip to content
snowkit

kits / secure-skills

v1.0.0

Secure Skills

Secret scanning, dependency audits, CSP rollout and first-hour incident steps, with configs ready to copy into your repo.

secure-skillsREADME.md

Markdown · 4.5 KB

Secure Skills

Version 1.0.0

Security checklists, configs and scripts for the jobs that sit between "we wrote the code" and "we sleep at night": catching secrets before they're committed, auditing dependencies every week, rolling out a Content Security Policy with real reports, reviewing sign-in and upload code, and knowing exactly what to do in the first hour after a leak. Every config is ready to copy into a repository, and every decision is explained in the Markdown next to it.

Who it's for

  • Developers who own security for a small team or a side project, without a dedicated security engineer
  • Teams setting up CI for a new repository and wanting sensible security checks from day one
  • Reviewers who need a concrete checklist for auth, sessions and file uploads
  • Anyone who has had a key leak once and doesn't want to improvise next time

It assumes you're comfortable with git, a terminal and your CI system. It goes further than a pre-launch checklist: each area has working files plus the reasoning behind them.

How to use it in 5 minutes

  1. Copy secrets/.gitleaks.toml to your repository root and run gitleaks git --redact . to see what's already in your history.
  2. Copy secrets/secret-scan.yml and dependencies/dependency-audit.yml into .github/workflows/, and dependencies/scripts/audit-deps.sh into scripts/.
  3. Run sh scripts/audit-deps.sh locally and look at what it reports.
  4. Print incident/first-hour-checklist.md and fill in the contacts table now, while nothing is on fire.
  5. Put headers/csp-rollout.md and the two checklists in checklists/ on your list for the next sprint.

File map

FileWhat it is
README.mdThis file
LICENSE.txtMIT licence
CHANGELOG.mdVersion history
secrets/README.mdSecret scanning at three layers: how the config, hook and CI workflow fit together, allowlist rules and baselines
secrets/.gitleaks.tomlScanner config with the built-in rules, a custom token rule and an allowlist example
secrets/pre-commit-setup.mdSetting up the pre-commit check with the pre-commit framework or a plain git hook, including Windows notes and team rollout
secrets/.pre-commit-config.yamlConfig for the pre-commit framework
secrets/hooks/pre-commitPlain git hook that scans staged changes and stops the commit on a finding
secrets/secret-scan.ymlGitHub Actions workflow: scans pull requests, pushes to main and full history weekly, with a checksum-verified scanner download
secrets/leaked-secret-response.mdWhat to do when a real secret is found: rotate first, check for misuse, then purge history
dependencies/README.mdHow the audit script and weekly workflow work, settings, and limits for each ecosystem
dependencies/scripts/audit-deps.shPOSIX shell script that runs npm, pnpm and Python audits and exits non-zero on findings at or above a threshold
dependencies/dependency-audit.ymlGitHub Actions workflow that runs the audit weekly and on dependency changes
dependencies/update-policy.mdFill-in policy: response times by severity, reachability, exceptions, routine updates and new dependency checks
headers/csp-rollout.mdFive-stage CSP rollout: reporting, report-only, triage, nonces and hashes, enforcement, plus a directives table
headers/csp-report-endpoint/node-server.mjsStandalone Node.js endpoint that receives and logs CSP violation reports, with no dependencies
headers/csp-report-endpoint/worker.jsThe same endpoint as a Cloudflare-style worker
headers/headers-checklist.mdReview checklist for live response headers: transport, CSP, CORS, caching, cookies and leaks
incident/first-hour-checklist.mdThe first hour after a suspected breach or leaked key: contain, keep evidence, tell people, rotate keys in order
incident/evidence-log.mdFill-in log for actions, evidence, credentials, notifications and open questions
checklists/auth-and-sessions.mdPasswords, sign-in, MFA, sessions, tokens, authorisation, recovery and OAuth
checklists/file-uploads.mdValidation, storage, serving, direct-to-storage uploads, processing and tests for upload features

A note on limits

These files reduce common risks and make your response faster. They can't make a system secure on their own, and they don't replace a professional review or penetration test for high-risk systems. Scanners only find known patterns and known advisories. The legal notes in the incident files are general; get advice for your own situation.

Licence

MIT License. See LICENSE.txt.