Repository navigation
Add repo-setup v1 config for Claude Code #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Security guidance for this repo | ||
|
|
||
| <!-- Created by /repo-setup. The security-guidance plugin feeds this file to its | ||
| reviewers. /repo-setup never overwrites this file after creating it. --> | ||
|
|
||
| ## What this repo is | ||
|
|
||
| - Type: library (Go client for the rypt API, encryption as a service in front of Google Cloud KMS) | ||
| - Languages: go | ||
| - Exposure: imported by other programs; it makes outbound HTTPS calls to https://api.rypt.dev (or a caller-chosen base URL) and listens on nothing | ||
|
|
||
| ## Trust boundaries | ||
|
|
||
| - Untrusted input enters through: API responses (status, headers such as Retry-After, and JSON bodies, including server text copied into errors), and caller arguments to exported functions (ids interpolated into URL paths, base URL, HTTP client, plaintexts and data keys) | ||
| - Secrets come from: the caller, who passes an API token or console session token to `NewClient` and plaintexts and data keys as byte slices; the examples and integration tests read `RYPT_TOKEN` and `RYPT_KEY_ID` from the environment; never from the repo | ||
|
|
||
| ## Rules | ||
|
|
||
| - Every query that touches tenant data filters by tenant ID. | ||
| - Every external input is validated before use in SQL, shell, file paths, or templates. | ||
| - Cryptography uses the standard library or a vetted library; no custom primitives. | ||
| - Errors returned to clients never include stack traces, SQL, or secrets. | ||
| - The token is sent only to the configured base URL over https (plain http only to a loopback host), and redirects are never followed. | ||
| - Server-supplied text in an error has control and format characters removed and any copy of the token redacted before it is kept. | ||
| - Plaintexts, data keys and request/response bodies that carry them stay byte slices, and the client clears its own copies when a call ends. | ||
|
|
||
| ## Known exceptions | ||
|
|
||
| - The tenant-ID rule does not apply here: the library has no data store, and the API enforces tenancy through the token's container. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "rules_version": 1, | ||
| "claude_commits": true, | ||
| "config_in_git": true, | ||
| "github_config": true, | ||
| "repo_type": ["library"], | ||
| "languages": ["go"], | ||
| "check_command": "make check", | ||
| "sbom": true, | ||
| "default_branch": "main", | ||
| "taskd_project": "rypt", | ||
| "required_checks": ["test", "lint", "vulncheck"], | ||
| "ruleset_include": ["~DEFAULT_BRANCH", "refs/heads/development"], | ||
| "security_scan": { "initial": "pending" } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(git commit *)", | ||
| "Bash(git push *)", | ||
| "Bash(gh pr create *)", | ||
| "Bash(gh pr view *)", | ||
| "Bash(gh pr checks *)" | ||
| ], | ||
| "deny": [ | ||
| "Bash(git push *--receive-pack*)", | ||
| "Bash(git push *--exec*)", | ||
| "Bash(git push *--force*)", | ||
| "Bash(git push *--delete*)", | ||
| "Bash(git push -d *)", | ||
| "Bash(git push * -d *)", | ||
| "Bash(git push *--mirror*)", | ||
| "Bash(git push *--prune*)", | ||
| "Bash(git push *:*)", | ||
| "Bash(git commit *--no-verify*)" | ||
| ] | ||
| }, | ||
| "enabledPlugins": { | ||
| "gopls-lsp@claude-plugins-official": true | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <!-- repo-setup:begin (managed by /repo-setup; edit outside this block) --> | ||
| ## Repo facts | ||
|
|
||
| - Repo type: library | ||
| - Languages: go | ||
| - Check command: `make check` | ||
| - Versioning: SemVer tags `vMAJOR.MINOR.PATCH` | ||
| - Default branch: `main` | ||
| - Claude may commit: yes | ||
| - taskd project: rypt | ||
| <!-- repo-setup:end --> | ||
|
|
||
| ## Branching | ||
|
|
||
| This repo does not use plain GitHub Flow. It overrides the global branching | ||
| rules as follows; [CONTRIBUTING.md](CONTRIBUTING.md) has the details. | ||
|
|
||
| - Feature branches start from `development`, not `main`. | ||
| - Pull requests target `development`: run `gh pr create --base development`. | ||
| - A release is a pull request from `development` into `main`, then a `v*` | ||
| tag on the merge commit. Hotfixes branch from `main` as `hotfix/...`. |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.