Repository navigation
Policy: reading a Kubernetes or Vault secret waits for a person (TK-A052, TK-A053) - #582
Merged
Merged
Conversation
The second blind E21 pool read secrets through kubectl and Vault, and every pack let them through. Two coding-pack rules, next to TK-A035, hold them in the coding, dev, server and strict packs: - TK-A052: kubectl's or oc's get of a secret with an output that prints it (any -o or --output but name and wide, custom-columns and kyaml too, or a --template), oc extract of a secret, view-secret (kubectl-view-secret too) and create token. The type is read in any case, with its API group, as TYPE/NAME, in a list (cm,secrets) or as a later TYPE/NAME, with the output before or after it. -n and --namespace take their value, so a namespace named secrets isn't a type, and a type ends at a space, / or , (a role named secret-reader isn't one). - TK-A053: vault's (or OpenBao's bao) kv get, read, unwrap, print token, token create and a write to auth/token/create. Listing secret names, describing one, kv list and metadata, token lookup and status stay allowed. Both rules are anchored and bounded: 11 ms at worst on 64 KiB on the fallback engine. The TK-A035 limits row no longer lists vault and kubectl as unheld (and names 1Password's op, not "1password"); a new row names what TK-A052 and TK-A053 don't read. E17 gains 22 harmful and 15 benign cases (800 of 800 held, 1 false alarm in 858). E21: the second blind pool (#401) is held 34 of 45 by default (was 30) and 37 strict (was 33), the four calls of the issue; the held-out pool 254 of 420 (60.5%, was 252) and 285 strict (was 284); no new false positive in any set. E21's committed machine and latency are kept. The coding pack's version is 2026.10-v2-57, which other open pull requests also take; it may need renumbering at merge. Finishes #549 by shrinivas-sn: their rules' cases and look-alikes, with the review's false-alarm fixes, other spellings, docs and evals. Fixes #404 Co-authored-by: shrinivas-sn <shrinusn2001@gmail.com> Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
…ype ninth in a list, or kubectl through an MCP tool Co-authored-by: shrinivas-sn <shrinusn2001@gmail.com> Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
…-run, E21's recorded latency rows kept Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
LoopGlitch26
added a commit
that referenced
this pull request
Nov 6, 2026
Brings in #582 (TK-A052, TK-A053; coding pack 2026.10-v2-63), #543 (TK-C010), #612, #595, #621 and the commits before them. - coding.yaml: version 2026.11-v2-64, the next free one. server-17, strict-10, server-core-1 and dev-1 are numbers main hasn't used. - docs/policy-v2.md: merged word by word, main's TK-A052 and TK-C010 text with this branch's. - docs/evaluation.md: main's "refreshed on macOS" note with this branch's dev-row note. - eval results: main's files, then E17, E21 rewrites (no --rebaseline) and E21 policy robustness re-run. The recorded latency rows are main's, and this branch's dev row (5.44 / 6.28) as before.
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.
Fixes #404. Supersedes #549 by @shrinivas-sn, who wrote the first version of TK-A052 and TK-A053 and their cases (credited as co-author). It carries the review's changes, with
mainmerged in after #543 and #608.What changed from #549:
kubectl get -o yaml clusterrole secret-readerand-n secrets-store: a type word now ends only at a space,/or,.-n/--namespacealways take their value, sokubectl get -n secrets deploy -o yamlisn't held.-o custom-columns=PW:.data.passwordand--template={{.data.password}};oc extract secret/db --to=-;cm,secrets);Secretin another case;vault print token,vault write auth/token/createandvault unwrap;bao, which uses the same commands.op(1Password's CLI), not1password.docs/policy-v2.md.TYPE/NAMEread, now fixed; the worst case takes 11 ms.Pack: coding becomes
2026.10-v2-63(main has-62); dev, server and strict change hash with it.Results:
--rebaselineor--record, the gates passed (default RE2p99_ref5.25, recorded 5.23).Tests (a sealed container, no network):
tests/test_signer_policy.py,test_policy2.py,test_eval_docs.py,test_e21_policy.pyandtest_e21_robustness.pypass (348, 30,867 subtests), E17 and E21 re-run equal the committed results, andmake lintis clean. Against main, over 11,615 calls on every pack and both engines, nothing is loosened: 164 calls are newly held, each byTK-A052orTK-A053, and no benign case changes.