Skip to content
This repository was archived by the owner on Nov 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,42 @@ jobs:
run: >-
uvx --with pandas --with numpy --with plotly pytest
claude/skills/quant/investment-research-dashboard/reporting/test_reporting.py -q

secret-scan:
# No secrets or private infra details in a public repo (TOM-1257).
# Rules: .gitleaks.toml. Known public-history findings: .gitleaksignore.
# pull_request scans only the PR's commits; push to main scans all history.
runs-on: ubuntu-latest
permissions:
contents: read
env:
GITLEAKS_VERSION: 8.30.1
# From the release's official gitleaks_8.30.1_checksums.txt.
GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: install gitleaks (pinned, checksum-verified)
run: |
set -euo pipefail
tarball="gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
curl -fsSL -o "$tarball" \
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/${tarball}"
echo "${GITLEAKS_SHA256} ${tarball}" | sha256sum -c -
mkdir -p "$RUNNER_TEMP/bin"
tar -xzf "$tarball" -C "$RUNNER_TEMP/bin" gitleaks
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
- name: gitleaks
env:
EVENT: ${{ github.event_name }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
set -euo pipefail
range=()
if [ "$EVENT" = "pull_request" ]; then
range=(--log-opts="${BASE_SHA}..${HEAD_SHA}")
fi
gitleaks git --no-banner --redact --config .gitleaks.toml "${range[@]}" .
26 changes: 26 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Secret / confidential-data scan (TOM-1257). Run by CI (.github/workflows/ci.yml)
# and by the local pre-commit hook (.pre-commit-config.yaml).
# Default gitleaks rules, plus two leaks the defaults do not know about.
# Known historical findings are suppressed one fingerprint at a time in
# .gitleaksignore -- never by path or rule here.

[extend]
useDefault = true

[[rules]]
id = "tailnet-ip"
description = "Tailscale / CGNAT IPv4 address (100.64.0.0/10) -- a private network address"
# \b, not a consumed boundary char: matches never overlap, so consuming the
# separator would hide an address that follows another one.
regex = '''\b100\.(?:6[4-9]|[7-9][0-9]|1[01][0-9]|12[0-7])\.[0-9]{1,3}\.[0-9]{1,3}\b'''
keywords = ["100."]

[[rules]]
id = "prod-home-path"
description = "Path under the production user's home (/home/prod/)"
# The leading slash sits outside the captured secret on purpose: the default
# global allowlist drops any secret matching ^/(?:bin|etc|home|...)/..., so a
# secret that starts with "/home/" would never be reported.
regex = '''/(home/prod/)'''
secretGroup = 1
keywords = ["/home/prod/"]
13 changes: 13 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Findings already in PUBLIC history, one exact fingerprint each
# (commit:file:rule:line). Rewriting history cannot un-publish them, so they
# are acknowledged here instead. Never add a path- or rule-wide entry.

# TOM-1257: free-tier Firecrawl key, not revoked by decision (Tom, 2026-09-29, TOM-1257); history is public (file deleted since).
326a7127073dab2974a610350ef5927bd5f893ae:project-templates/default-quant/.mcp/firecrawl/.mcp.json:generic-api-key:10

# TOM-1257: tailnet address, history is public (removed in 28110dd).
3de3320003f7b9852f26d479b070b77e97b80f64:plugins/qute-essentials/scripts/tasks/lib.sh:tailnet-ip:56
3de3320003f7b9852f26d479b070b77e97b80f64:plugins/qute-essentials/scripts/tasks/lib.sh:tailnet-ip:65

# TOM-1257: prod home path in prose, history is public (file moved out since).
6e0735787739b69e344d38ed6f4cb57770e48e47:plugins/qute-essentials/skills/wtf/SKILL.md:prod-home-path:97
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Local secret scan on staged changes (TOM-1257); CI runs the same rules.
# Setup (install gitleaks, then `pre-commit install`): see README.md.
repos:
- repo: local
hooks:
- id: gitleaks
name: gitleaks (staged changes)
language: system
stages: [pre-commit]
pass_filenames: false
always_run: true
# A missing binary FAILS: "could not check" must never look clean.
entry: >-
bash -c 'command -v gitleaks >/dev/null 2>&1 || {
echo "gitleaks not found: install it (https://github.com/gitleaks/gitleaks#installing)
or this commit cannot be checked for secrets." >&2; exit 1; };
exec gitleaks git --pre-commit --staged --redact --no-banner --config .gitleaks.toml .'
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ qute-research plugin (`templates/research-scaffold/`), stamped by `onboard repo`
- [`docs/adr/`](docs/adr/) — pointer to the plugin ADRs (history stays in git)
- [`docs/resources.md`](docs/resources.md) — curated external links (interesting repos, tools, reading)

See [`CLAUDE.md`](CLAUDE.md) for repo conventions.
See [`CLAUDE.md`](CLAUDE.md) for repo conventions. Before committing here, install
[pre-commit](https://pre-commit.com) and [gitleaks](https://github.com/gitleaks/gitleaks), then run
`pre-commit install` — this repo is public.
Loading