chore(security): externalise confidentiality term list
Moves the list of private organisation / pilot / codename
strings the security gate blocks OUT of the repo entirely.
Before: tools/security/check-staged.sh + the Today AI prompt
+ docs/today-pipeline.md held the strings in plaintext. The
whole point of the gate is to keep certain strings out of
committed artefacts, so holding them in a committed
artefact was self-defeating — anyone with read access to
the repo trivially recovered the very list we tried to
protect.
After:
- The gate reads a runtime file
`${FAI_BANNED_TERMS_FILE:-~/.fai-security/banned-terms.txt}`
at scan time. One regex per line, `#`-prefixed comments,
matched case-insensitively against staged diffs and
commit messages. Repos contain no copy.
- Pre-commit / commit-msg modes log a warning + skip the
confidential-terms scan if the file is missing (fresh
checkouts shouldn't trip until the operator bootstraps
the list).
- CI mode (`check-staged.sh ci`) FAILS when the file is
missing — runners are expected to be bootstrapped by
their deploy step.
- The unit-test harness uses a synthetic placeholder term
(`SYNTHETIC_BANNED_TERM_XYZZY`) injected via a temp
banned-terms file, so the test never references real
customer names.
- docs/today-pipeline.md + tools/today/prompt.template.md
point at the runtime file instead of enumerating terms.
Operator bootstrap (one-time, per machine):
mkdir -p ~/.fai-security && chmod 700 ~/.fai-security
printf '\\b%s\\b\\n' TERM_A TERM_B > ~/.fai-security/banned-terms.txt
chmod 600 ~/.fai-security/banned-terms.txt
Gate self-tests: 18 passed, 0 failed.
Signed-off-by: flemming-it <sf@flemming.it>
Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
21c2a0f411
commit
efa9871a75
4 changed files with 84 additions and 20 deletions
|
|
@ -32,9 +32,14 @@ feel like they're reading a translation.
|
|||
- Banned words: "viral", "killer", "powerful", "just works",
|
||||
"revolutionary", "game-changing", "seamless", "next-generation",
|
||||
"cutting-edge", "world-class", "unprecedented".
|
||||
- No private organisation names: never "ITDZ", "Kammergericht",
|
||||
"HTW", "J∆I", or any specific institution. Generic terms only —
|
||||
"a regulated organisation", "a public administration".
|
||||
- No private organisation, person, or location names. Pilot
|
||||
customers, internal codenames, specific institutions, and
|
||||
specific cities never appear in Today copy. Generic terms
|
||||
only — "a regulated organisation", "a public administration",
|
||||
"a critical-infrastructure operator". The operator's
|
||||
banned-terms list at ~/.fai-security/banned-terms.txt is the
|
||||
authoritative source; this prompt deliberately doesn't
|
||||
enumerate the strings.
|
||||
- No emoji.
|
||||
- No "Co-authored-by Claude" or other AI attribution.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue