Add claude-code-security-baseline skill - #1559
Open
Miko Builds (mikobuilds) wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
claude-code-security-baselinesets up the security baseline for a project before an agent starts working in it: apermissions.denylist in.claude/settings.json, a gitleaks pre-commit hook, an.env.examplethat documents a read-only database role, prompt-injection rules appended toCLAUDE.md, and.envadded to.gitignore.The problem it solves
Letting an agent into a repo is fine until it isn't -
git reset --hardover uncommitted work, a key that lands in a public repo, a destructive query against production because a stale migration looked wrong to it. None of that takes a clever attack. It takes one confident agent and one tired developer clicking "yes" at two in the morning. Everyone means to set those four files up, nobody remembers the exact syntax, so it gets skipped.Who uses it
Solo devs and small teams starting a repo, or pointing Claude Code at an existing one. The checklist behind it came out of my own projects and was published first; this skill is that checklist automated.
Safety
Nothing is ever overwritten. An existing
settings.jsonkeeps its own keys and gains only the deny rules it's missing, an existingCLAUDE.mdgets a section appended, and a second run reports "left alone" and changes nothing.--checkwrites nothing at all and only reports what's missing. Standard library Python, no network calls, no telemetry - which matters, given what it's touching.Example
It also prints the two traps that make the whole setup silently useless: edits to
.claude/settings.jsononly take effect from the next session, and a pre-commit config scans nothing untilpre-commit installhas actually been run. Related trap, since people test it this way: don't check gitleaks withAKIAIOSFODNN7EXAMPLE, it's on the allow-list and sails straight through.Where I put it
Security & Systems, first alphabetically. Linked to the source repo rather than vendored here, same as the other entries in that section.
Repo: https://github.com/mikobuilds/claude-code-security-checklist (MIT)