Repository navigation
v0.1.0
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Changelog
- 553cbba Add cmd/permcop/main.go and fix .gitignore
- 4954386 Initial implementation of permcop
- 9cf3d66 chore(lint): fix goimports formatting in engine_test.go
- 7a4df44 chore: add .code-review/ to .gitignore
- 269371d chore: ignore .permcop.local.toml
- c56283d chore: ignore vim swap files
- 2ca7b9d docs(cmd): correct stale per-unit coverage comment in import output
- 6648e0b docs(cmd): remove stale --append reference from runImportClaudeSettings comment (per-fru3)
- 8b1fa27 docs(parser): explain why dblQuotedToString is separate from wordToString (per-aae6)
- fb2d225 docs(readme): document suggest command, log rotation, and rotation config
- b6efc1d docs(readme): explain allow_write zone model and flag scoped mode as unimplemented
- a4c54f9 feat(audit): add log rotation with size-based trigger
- b04dee9 feat(audit): add per-unit rule match logging
- d7088b1 feat(audit): surface near-miss hints when expand_variables skips a rule
- f9f69eb feat(cmd): add project-mode awareness to init and import-claude-settings
- ed3df96 feat(config): add .local.toml config variant support
- f07a21f feat(config): warn on unknown_variable_action=allow with broad pattern (per-t7x4)
- e5005d6 feat(hook): emit structured JSON output for Claude Code PreToolUse
- b1cbac1 feat(importer): group bash rules by command prefix instead of one big rule
- 2763d5c feat(init): only hook Bash by default; document why
- 47bdee7 feat(init): write per-project audit log path in starter config
- f2f1219 feat(interactive): prompt to add rule on default deny
- e5a4f6b feat(rules): add expand_variables per-rule option for variable expansion
- 3883ea5 feat(rules): add word_glob pattern type for token-aware matching
- b403467 feat(rules): switch to per-unit coverage in Pass 2
- aa3a46d feat(suggest): add audit reader and suggest command tests
- e053e32 feat(suggest): annotate chained commands and generate rules for pass units
- 1ff4992 feat(suggest): interactive checkbox UI for command selection
- 575d08d feat(suggest): replace checkbox UI with full-screen pager TUI
- d0f794d feat(suggest): two-panel TUI with detail pane below command list
- d507263 feat(suggest): validate rule TOML in editor loop before accepting
- bbfeafd feat(validate): show all active config layers and validate rule patterns
- ad9a40a feat: add escalate_flags and strip_command_path
- 1ec17e1 feat: replace default-deny with pass-through to Claude Code
- b4dff92 fix(audit): local timestamps and per-unit detail on PASS entries
- 6cec37d fix(ci): add version field and remove v2-incompatible linters from golangci config
- 3cbaebd fix(ci): migrate golangci config to v2 schema
- bd692be fix(ci): update golangci-lint-action to v9 and fix UTC timestamp test
- e07e485 fix(cmd): also search settings.local.json when resolving Claude source
- 727116a fix(config): extend warnBroadAllowRules to cover AllowRead/AllowWrite (per-yzl2)
- c001378 fix(config): stop project config search at git repo root (per-8z93)
- e2bc935 fix(config): traverse past .git files in git worktrees during config search
- 2d92cf5 fix(engine): detect sudo via AST units, not raw string prefix (per-4x33)
- ec44ead fix(engine): surface audit log write errors to stderr (per-5g5a)
- a518dcb fix(hook): drop ask output; fall through to Claude Code permission system
- 8b83ef0 fix(hook): prevent ParseError.Error() from mutating RawInput backing array
- 679c52c fix(hook): use JSON protocol for all deny paths in runCheck
- ad6e973 fix(hook): use non-empty sentinel for ToolUnknown (per-25rb)
- 6eed061 fix(importer): merge settings.json and settings.local.json instead of stopping at first match
- 0331dcb fix(importer): translate :* wildcard to prefix type instead of glob
- c4220db fix(importer): translate Claude Code colon syntax to permcop glob format
- 938fe7f fix(init): default to local config instead of shared
- d90199a fix(init): register hook at project level by default
- ffac49f fix(lint): resolve all 61 golangci-lint v2 issues
- b1d65c4 fix(main): fail-closed on os.Getwd() errors in runCheck and runExplain
- cbd9bc1 fix(main): handle os.UserHomeDir() errors in runValidate, runInit, runImportClaudeSettings
- 5652d6f fix(main): write settings.json atomically via temp file + rename
- 955f59a fix(parser): extract commands from variable assignment subshells
- 2062037 fix(parser): handle heredocs and double-quoted subshells correctly
- 1709806 fix(parser): treat 2>&1 and fd redirects as non-file ops
- dab6ab5 fix(rules): eliminate double regex in expandVars and surface pattern compile errors
- dd76565 fix(rules): suppress duplicate DENY log on fallthrough
- fed956a fix(security): reject unknown pattern types and expand ~/ in file patterns
- 092451f fix(suggest): fix checkbox rendering artifacts and line-wrap corruption
- 1120323 fix(validate): resolve relative paths from CWD, not home directory
- 3477b89 fix: propagate UserHomeDir error and bound hook stdin reads
- 353b46b perf(engine): pre-compile glob/regex patterns at construction (per-cq7j)
- 28ffa9c refactor(audit): persist file handle across Log() calls (per-w50c)
- 5c49324 refactor(explain): eliminate double-parse in runExplain (per-l01r)
- 0f9a708 refactor(importer): replace custom containsString/containsRuneSlice with strings.Contains
- 97cb23d refactor(rules): deduplicate newTestEngine/newTestEngineWithEnv helpers
- e7dcbf3 security(ci): pin GitHub Actions to commit SHAs (per-v01x)
- c052ad4 security(cmd): preserve original file permissions on settings.json rewrite (per-vtz2)
- b9e138a security(config): validate log_file path is within home directory (per-22w0)
- b1cdc63 security(hook): canonicalize symlinks in absolutePath (per-gtqj)