fix: resolve 11 council-audited violations across athena subsystem

- Add switch_agent to athena-junior deny list (P1 defense-in-depth)
- Add terminal status check to waitForSessionIds polling loop
- Add athena-junior to OverridableAgentNameSchema and AgentOverridesSchema
- Add explicit retry workflow instructions to non-interactive prompt Step 9
- Fix JSON schema generation to exclude defaulted fields from required arrays
- Fix docs example for non_interactive_member_list (remove Council: prefix)
- Use segment-aware regex in path-policy.ts to block fake.sisyphus/ paths
- Add defensive path resolution and contract validation for prompt_file
- Add explicit .optional() to AthenaOverrideConfigSchema fields for clarity
- Fix traversal check precision for .. prefixed directory names
This commit is contained in:
ismeth
2026-03-03 22:37:26 +01:00
committed by YeonGyu-Kim
parent 6db83b937f
commit 62cf707502
9 changed files with 97 additions and 20 deletions
@@ -16,13 +16,13 @@ export function isAllowedPath(filePath: string, workspaceRoot: string): boolean
// 2. Get relative path from workspace root
const rel = relative(workspaceRoot, resolved)
// 3. Reject if escapes root (starts with ".." or is absolute)
if (rel.startsWith("..") || isAbsolute(rel)) {
// 3. Reject if escapes root (traversal or absolute path)
if ((rel === ".." || rel.startsWith("../") || rel.startsWith("..\\")) || isAbsolute(rel)) {
return false
}
// 4. Check if .sisyphus/ or .sisyphus\ exists anywhere in the path (case-insensitive)
if (!/\.sisyphus[/\\]/i.test(rel)) {
// 4. Check if .sisyphus is a complete path segment
if (!/(^|[\/\\])\.sisyphus[\/\\]/i.test(rel)) {
return false
}