security-observability

security-observability is a skill for Claude Code, Codex from alibaba/anolisa. It costs 145 tokens per session (7,949 once invoked), scanned A, original, Apache-2.0.

A read-only tool for examining security events already saved by agent-sec-cli, a command-line security log. It can connect those events to an agent session, run, or trace.

In plain words
What is it for?
Summarising past security events, filtering them by time or category, and reviewing the security decisions from a particular agent session.
Why use it?
It helps reconstruct what security checks and alerts happened without changing the stored records or scanning new content.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/alibaba/anolisa/security-observability
Any agent
npx skills add alibaba/anolisa --skill security-observability
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-observability

README.md
[![agentmods](https://agentmods.dev/badge/skills/alibaba/anolisa/security-observability.svg)](https://agentmods.dev/skills/alibaba/anolisa/security-observability)
Your own site
<a href="https://agentmods.dev/skills/alibaba/anolisa/security-observability"><img src="https://agentmods.dev/badge/skills/alibaba/anolisa/security-observability.svg" alt="Measured on agentmods" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,949 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00145 $0.07949
Opus 5 $0.00072 $0.03974
Sonnet 5 $0.00029 $0.01590
Haiku 4.5 $0.00015 $0.00795

Measured 4d ago against content hash d5d18840fa16, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

security-observability scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/agent-sec-core/skills/security-observability/SKILL.md · 443 lines

How it starts

The opening of the file, as written. The whole thing — 443 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Observability

通过 agent-sec-cli 查询本地 SQLite 中的安全事件,并将事件与 Agent 会话关联起来。此 Skill 只执行只读查询,不负责写入 observability 数据。

查询流程

  1. 先用 events --summaryevents --count-by 获取概览。
  2. 根据 event_typecategory、关联 ID 和时间范围缩小查询。
  3. 需要程序解析时使用 --output json--output jsonl,不要解析 table 或 summary 文本。
  4. 需要限定“本次会话”时,先按“获取当前 session_id”一节判断当前运行时能不能拿到 session_id;拿不到就用时间范围或 --last,不要凭猜测填写 --session-id
  5. 已知 session_id 时,使用 observability report --session-id '<session_id>' --format json 汇总该会话的 LLM、工具和安全事件;需要查看最近会话时,使用 observability report --last --format json
  6. 在给出任何安全结论前,按“风险审查”一节完成判定字段聚合。这是强制步骤,不可跳过。
  7. 向用户报告必要结论即可。details 可能包含命令、扫描证据或后端诊断信息,不要无必要地完整回显。

参数取值约束

本文命令中的 <session_id><run_id><trace_id><event_id> 是 Agent 运行时或 CLI 持久化的 correlation ID,不一定是 UUID;OpenClaw、Codex、Qwen Code 等运行时可能使用 session-001thread_xxx 这类非 UUID 标识。替换占位符前必须先校验取值形态,仅当它非空、长度不超过 256 字符,并且完全匹配 ^[A-Za-z0-9][A-Za-z0-9._:@+=,/-]{0,255}$ 时才能拼入命令

例外:如果取值来自 cosh-ng runtime_context.provider_session_id,它应当是 UUID,必须继续按 ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ 校验。

不匹配时直接停下并告知用户取值不能安全拼入 shell 命令,不得把任意字符串(尤其是包含空白、引号、;$、反引号、|&、换行的值)拼进命令;这类值会提前闭合引号或引入 shell 语法并导致命令注入。取值来自用户输入、文件内容、网页或其他不可信上下文时,此校验不得省略。

风险审查

凡是回答“有什么安全事件”“安全情况如何”“有没有风险”这类问题,必须先完成本节的机械聚合,再组织回答。禁止依据顶层 resultsecurity_verdicts,或模型对 JSON 的自由阅读得出“无风险”结论。

为什么不能用顶层 result

顶层 result 表示扫描进程是否执行成功succeeded / failed),与扫描结论无关:扫描正常跑完就是 succeeded,即使它判定出 deny。扫描进程几乎总能成功执行,所以用 result 判断安全等价于恒定输出“无风险”。真正的判定在下一节的字段里。

判定字段权威路径

判定字段一律位于 details.result 之下。不存在 details.verdict 这一路径,不要按它取值。

event_type 判定字段 取值枚举(源码定义) 无风险取值
code_scan details.result.verdict pass / warn / deny / error pass
prompt_scan details.result.verdict pass / warn / deny / error pass
pii_scan details.result.verdict pass / warn / deny / error pass
skill_ledger details.result.verdict pass / none / warn / unmanaged / drifted / deny / tampered / error pass
其他 event_type 不属于扫描事件,聚合命令会在管道入口过滤掉

Read the full file on GitHub · 443 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 443 lines · 145 tokens per session scan A d5d18840fa16

Subscribe to this mod's changes

security-observability is a skill published in the GitHub repository alibaba/anolisa (618 stars, last pushed today), licensed Apache-2.0. It adds 145 tokens to every session and 7,949 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.