Skip to content

fix(security): surface swallowed permission-set resolution failures (#2565) - #2568

Merged
os-zhuang merged 1 commit into
mainfrom
claude/2565-permset-resolve-observability
Jul 4, 2026
Merged

fix(security): surface swallowed permission-set resolution failures (#2565)#2568
os-zhuang merged 1 commit into
mainfrom
claude/2565-permset-resolve-observability

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

概述

修复 #2565(2026-07-04 授权架构评估中发现的可观测性缺口):PermissionEvaluator.resolvePermissionSets 静默吞掉 metadata list()sys_permission_set dbLoader 的异常。方向是对的(fail-closed:解析不到的权限集不授予任何权限),但一次瞬时 DB 抖动会让自定义权限集无声消失,由此产生的 403 无从排查。

变更

  • evaluator 增加可选 { logger } 参数,两个 catch 各发一条 warn,带上未解析的权限集名字 + 错误信息
  • SecurityPlugin 在两处调用点(主解析 + fallback)注入其插件 logger
  • 解析行为逐字节不变——纯日志增强

验证

  • 3 个新单测:dbLoader 抛错时 warn + 继续解析已解析集、metadata list() 抛错时 warn + 走 bootstrap、无 logger 时静默(向后兼容)
  • plugin-security 全套测试通过

关联

🤖 Generated with Claude Code

https://claude.ai/code/session_014y5kiH3aPLWtRRRGcVrXcT


Generated by Claude Code

@vercel

vercelBot commented Jul 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJul 4, 2026 8:42am

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests tooling size/s labels Jul 4, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-security.

10 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/implementation-status.mdx(via @objectstack/plugin-security)
  • content/docs/concepts/packages.mdx(via @objectstack/plugin-security)
  • content/docs/getting-started/cli.mdx(via @objectstack/plugin-security)
  • content/docs/guides/cheatsheets/permissions-matrix.mdx(via packages/plugins/plugin-security)
  • content/docs/guides/metadata/dashboard.mdx(via @objectstack/plugin-security)
  • content/docs/guides/packages.mdx(via @objectstack/plugin-security)
  • content/docs/guides/plugins.mdx(via @objectstack/plugin-security)
  • content/docs/guides/security.mdx(via @objectstack/plugin-security)
  • content/docs/guides/solutions/data-automation-interface-access.mdx(via packages/plugins/plugin-security)
  • content/docs/guides/solutions/role-based-interfaces.mdx(via packages/plugins/plugin-security)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

…2565)
resolvePermissionSets swallowed metadata list() and sys_permission_set
dbLoader failures silently — fail-closed (unresolvable sets grant
nothing), but a transient DB error made custom permission sets vanish
with no trace, leaving the resulting 403s undiagnosable. The evaluator
now accepts an optional { logger } and emits one warn per failed source,
naming the unresolved sets + the error; SecurityPlugin wires its logger
into both call sites. Resolution behavior is byte-identical.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014y5kiH3aPLWtRRRGcVrXcT
@os-zhuang
os-zhuangforce-pushed the claude/2565-permset-resolve-observability branch from 0c6f68a to 453476fCompareJuly 4, 2026 08:36
@os-zhuang
os-zhuang marked this pull request as ready for review July 4, 2026 08:47
@os-zhuang
os-zhuang merged commit 48ad533 into mainJul 4, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the claude/2565-permset-resolve-observability branch July 4, 2026 08:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/steststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@os-zhuang@claude