Skip to content

feat(registry): classify exec-family + -delete safety (config phase C1) - #100

Merged
helly25 merged 2 commits into
mainfrom
feat/config-safety-tags
Jun 23, 2026
Merged

feat(registry): classify exec-family + -delete safety (config phase C1)#100
helly25 merged 2 commits into
mainfrom
feat/config-safety-tags

Conversation

@helly25

@helly25 helly25 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

First slice of the config policy gate (#58, phase C), per docs/design-config.md.

Tags the security-relevant registry primaries via the existing Descriptor.safety field (all previously defaulted to kNone):

  • exec family (-exec, -execdir, -ok, -okdir, -capture, -capturedir) -> Safety::kSecurity (sensitive: runs arbitrary commands).
  • -delete -> Safety::kSafety (destructive: data loss).
  • everything else stays kNone (safe).

registry_test verifies the classification. C2 builds the per-layer policy + gate logic; C3 wires drop-and-warn. Green on default + --config=clang --config=asan.

First slice of the config policy gate (#58, phase C), per docs/design-config.md. Tags the security-relevant registry primaries via the existing Descriptor.safety field (all previously defaulted to kNone):
- exec family (-exec, -execdir, -ok, -okdir, -capture, -capturedir) -> Safety::kSecurity (sensitive: runs arbitrary commands).
- -delete -> Safety::kSafety (destructive: data loss).
- everything else stays kNone (safe).

registry_test verifies the classification. Nothing reads safety behaviourally yet; C2 builds the per-layer policy table + gate logic keyed off this, C3 wires drop-and-warn into the config resolve/apply path. Green on default + clang-asan.
@helly25
helly25 enabled auto-merge (squash) June 23, 2026 20:54
@helly25
helly25 disabled auto-merge June 23, 2026 20:57
…line)

Adding the .safety tag pushed the exec-family descriptors plus their trailing comments past the column limit, so clang-format exploded each into 4 lines. Moving each comment to its own line above the element keeps the descriptor on a single line - no comment at the end of a long line.
@helly25
helly25 merged commit 22db8c7 into main Jun 23, 2026
5 checks passed
@helly25
helly25 deleted the feat/config-safety-tags branch June 23, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant