Skip to content

Commit aba20ff

Browse files
committed
chore(security): add govulncheck CI job, SECURITY.md, and spell config
- CI runs govulncheck on every push to catch known vulnerabilities in the module and its dependencies. - SECURITY.md documents the threat model (no shell interpolation, no credential handling, text sanitization) and how to report issues. - Stop .gitignore's *.md rule from hiding SECURITY.md. - cspell.json whitelists project-specific terms.
1 parent 84de922 commit aba20ff

4 files changed

Lines changed: 70 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,16 @@ jobs:
1717
- run: go vet ./...
1818
- run: go build ./...
1919
- run: go test -race ./...
20+
21+
security:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-go@v5
26+
with:
27+
go-version: "1.24"
28+
# Scan dependencies and our own code for known Go vulnerabilities.
29+
- name: govulncheck
30+
run: |
31+
go install golang.org/x/vuln/cmd/govulncheck@latest
32+
govulncheck ./...

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Generated reports
22
*.md
33
!README.md
4+
!SECURITY.md
45

56
# Temporary files
67
temp_*

‎SECURITY.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Security
2+
3+
## Reporting a vulnerability
4+
5+
Please report security issues privately via
6+
[GitHub Security Advisories](https://github.com/ashishxcode/commit-chronicle/security/advisories/new)
7+
rather than opening a public issue. We aim to acknowledge reports within a few
8+
days.
9+
10+
## Design notes
11+
12+
commit-chronicle is a local, single-user CLI. It reads your own repositories and
13+
talks to GitHub through the `gh` CLI you have already authenticated. With that in
14+
mind:
15+
16+
- **No shell interpolation.** All `git`/`gh` invocations use `exec.Command` with
17+
an explicit argument vector — never a shell — so repo paths, author names, PR
18+
numbers, and date strings cannot be used for command injection.
19+
- **No credential handling.** GitHub authentication is delegated entirely to
20+
`gh`; this tool never reads, stores, or transmits tokens.
21+
- **Untrusted text is sanitized.** Commit messages and PR titles come from other
22+
people. Before they are shown in the picker, preview, or a worklog printed to
23+
the terminal, `model.CleanText` strips ANSI/terminal escape sequences and
24+
control characters so a crafted message cannot hijack your terminal.
25+
- **Dependency scanning.** CI runs
26+
[`govulncheck`](https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck) on every
27+
push to catch known vulnerabilities in the module and its dependencies.

‎cspell.json‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"words": [
5+
"ashishxcode",
6+
"bubbletea",
7+
"charmbracelet",
8+
"fzf",
9+
"GOBIN",
10+
"GOPATH",
11+
"gum",
12+
"isatty",
13+
"lipgloss",
14+
"mattn",
15+
"pbcopy",
16+
"unioned",
17+
"usr",
18+
"worklog",
19+
"xclip",
20+
"xdg",
21+
"Culture"
22+
],
23+
"ignorePaths": [
24+
"go.sum",
25+
"go.mod",
26+
"dist/",
27+
"bin/"
28+
]
29+
}

0 commit comments

Comments
 (0)