permission audit: daemon-made resolutions (orchestration allowlist, scheduler no-client deny, refused-edit deny) are never audited
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Start with packages/server/src/ws-server.js and _sessionEventAuditHandler, then read PermissionManager.respondToPermission and the three named decision paths in orchestration/permission-gate.js, scheduler.js, and permission-resolver.js. Run or add tests for each daemon decision and a client answer. Done means each daemon decision produces exactly one audit entry with clientId: null and its resolvedBy kind, while a client answer is audited exactly once.
Written by the indexing model from the issue text.
Description
Context
Identified during review of PR #9127 (S4 of #9112, closes #9119). This is pre-existing behaviour: #9127 does not change what is audited.
Location: packages/server/src/ws-server.js (_sessionEventAuditHandler, about line 1460) and PermissionManager.respondToPermission
Description
The permission audit log records each resolution in one of two places:
- User answers: a client's WS answer is audited inline by the settings handler.
- Auto-deny paths (timeout, abort, cleared): audited by
_sessionEventAuditHandler, which skips any event withreason === 'user'.
Daemon-made decisions go through respondToPermission, which always emits reason: 'user'. That covers:
- the orchestration allowlist's allow and deny (
orchestration/permission-gate.js) - the scheduler's auto-deny when no client is connected (
scheduler.js) - the deny after a refused edit (
permission-resolver.js)
These decisions are neither client answers nor caught by the auto-deny handler, so they are never written to the audit log.
#9127 added resolvedBy to permission_resolved. These paths now carry rule or cleared, and only a client answer carries user. The audit handler can use that field to tell the cases apart.
Acceptance Criteria
-
_sessionEventAuditHandleraudits every resolution whoseresolvedBy.kindis notuser(or is absent), withclientId: nulland theresolvedBykind recorded. Client answers are not double-audited. - Tests cover an orchestration allowlist allow, a scheduler no-client deny and a refused-edit deny, each producing exactly one audit entry.
- A test shows a client answer is still audited exactly once.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 1
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 333
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from blamechris/chroxy
-
from-review tech-debt testing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
blamechris/chroxy#9520 ·
Maintainers usually reply within 1 day
-
priority: low server
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
blamechris/chroxy#9340 ·
Maintainers usually reply within 1 day
-
documentation from-review
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
blamechris/chroxy#9237 ·
Maintainers usually reply within 1 day
-
agent-control client: notify() docstring should say the outbound gate applies only in principal modeOpenenhancement from-review
Difficulty 1/5 Under an hour Newbie friendliness 80/100
blamechris/chroxy#9227 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
blamechris/chroxy#9108 ·
Maintainers usually reply within 1 day
All issues in blamechris/chroxy
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Use one constant for the 10,000-character input limitPossibly taken @NginxL claimed this today. Opengood first issue refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aniru-dh21/snap-validate#51 ·
Maintainers usually reply within 1 day
-
Documentation pleaseOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area/host bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Fei2411/DeepSeek-Bot#3190 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days