# trivy - Doramagic AI Context Pack

> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。

## 充分原则

- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。
- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。

## 给宿主 AI 的使用方式

你正在读取 Doramagic 为 trivy 编译的 AI Context Pack。请把它当作开工前上下文：帮助用户理解适合谁、能做什么、如何开始、哪些必须安装后验证、风险在哪里。不要声称你已经安装、运行或执行了目标项目。

## Claim 消费规则

- **事实来源**：Repo Evidence + Claim/Evidence Graph；Human Wiki 只提供显著性、术语和叙事结构。
- **事实最低状态**：`supported`
- `supported`：可以作为项目事实使用，但回答中必须引用 claim_id 和证据路径。
- `weak`：只能作为低置信度线索，必须要求用户继续核实。
- `inferred`：只能用于风险提示或待确认问题，不能包装成项目事实。
- `unverified`：不得作为事实使用，应明确说证据不足。
- `contradicted`：必须展示冲突来源，不得替用户强行选择一个版本。

## 它最适合谁

- **想在安装前理解开源项目价值和边界的用户**：当前证据主要来自项目文档。 证据：`README.md` Claim：`clm_0002` supported 0.86

## 它能做什么

- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`docs/getting-started/installation.md`, `docs/getting-started/signature-verification.md`, `docs/guide/references/modes/client-server.md`, `docs/tutorials/integrations/circleci.md` 等 Claim：`clm_0001` supported 0.86

## 怎么开始

- `curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin {{ git.tag }}` 证据：`docs/getting-started/installation.md` Claim：`clm_0003` supported 0.86
- `curl https://aquasecurity.github.io/trivy-repo/rpm/public.key \` 证据：`docs/getting-started/signature-verification.md` Claim：`clm_0004` supported 0.86
- `curl -L https://github.com/aquasecurity/trivy/releases/download/<version>/<file name>.rpm \` 证据：`docs/getting-started/signature-verification.md` Claim：`clm_0005` supported 0.86
- `curl -s 0.0.0.0:8080/healthz` 证据：`docs/guide/references/modes/client-server.md` Claim：`clm_0006` unverified 0.25
- `curl -s 0.0.0.0:8080/version | jq` 证据：`docs/guide/references/modes/client-server.md` Claim：`clm_0007` unverified 0.25
- `curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin` 证据：`docs/tutorials/integrations/circleci.md` Claim：`clm_0008` unverified 0.25
- `git clone git@github.com:Cloud-Native-Security/trivy-demo.git` 证据：`docs/tutorials/misconfiguration/terraform.md` Claim：`clm_0009` unverified 0.25

## 继续前判断卡

- **当前建议**：先做角色匹配试用
- **为什么**：这个项目更像角色库，核心风险是选错角色或把角色文案当执行能力；先用 Prompt Preview 试角色匹配，再决定是否沙盒导入。

### 30 秒判断

- **现在怎么做**：先做角色匹配试用
- **最小安全下一步**：先用 Prompt Preview 试角色匹配；满意后再隔离导入
- **先别相信**：角色质量和任务匹配不能直接相信。
- **继续会触碰**：角色选择偏差、命令执行、本地环境或项目文件

### 现在可以相信

- **适合人群线索：想在安装前理解开源项目价值和边界的用户**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`docs/getting-started/installation.md`, `docs/getting-started/signature-verification.md`, `docs/guide/references/modes/client-server.md`, `docs/tutorials/integrations/circleci.md` 等 Claim：`clm_0001` supported 0.86
- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`docs/getting-started/installation.md` Claim：`clm_0003` supported 0.86

### 现在还不能相信

- **角色质量和任务匹配不能直接相信。**（unverified）：角色库证明有很多角色，不证明每个角色都适合你的具体任务，也不证明角色能产生高质量结果。
- **不能把角色文案当成真实执行能力。**（unverified）：安装前只能判断角色描述和任务画像是否匹配，不能证明它能在宿主 AI 里完成任务。
- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。
- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。
- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。
- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。
- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。
- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。

### 继续会触碰什么

- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`docs/getting-started/installation.md`, `docs/getting-started/signature-verification.md`, `docs/guide/references/modes/client-server.md`, `docs/tutorials/integrations/circleci.md` 等
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`docs/getting-started/installation.md`, `docs/getting-started/signature-verification.md`, `docs/guide/references/modes/client-server.md`, `docs/tutorials/integrations/circleci.md` 等
- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。

### 最小安全下一步

- **先跑 Prompt Preview**：先用交互式试用验证任务画像和角色匹配，不要先导入整套角色库。（适用：任何项目都适用，尤其是输出质量未知时。）
- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）
- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）

### 退出方式

- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。
- **保留原始角色选择记录**：如果输出偏题，可以回到任务画像阶段重新选择角色，而不是继续沿着错误角色推进。
- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。
- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。

## 哪些只能预览

- 解释项目适合谁和能做什么
- 基于项目文档演示典型对话流程
- 帮助用户判断是否值得安装或继续研究

## 哪些必须安装后验证

- 真实安装 Skill、插件或 CLI
- 执行脚本、修改本地文件或访问外部服务
- 验证真实输出质量、性能和兼容性

## 边界与风险判断卡

- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0010` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`docs/getting-started/installation.md`, `docs/getting-started/signature-verification.md`, `docs/guide/references/modes/client-server.md`, `docs/tutorials/integrations/circleci.md` 等 Claim：`clm_0011` supported 0.86
- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。
- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。
- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。

## 开工前工作上下文

### 加载顺序

- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。
- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。
- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。
- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。
- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。

### 任务路由

- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`docs/getting-started/installation.md`, `docs/getting-started/signature-verification.md`, `docs/guide/references/modes/client-server.md`, `docs/tutorials/integrations/circleci.md` 等 Claim：`clm_0001` supported 0.86

### 上下文规模

- 文件总数：3170
- 重要文件覆盖：40/3170
- 证据索引条目：80
- 角色 / Skill 条目：62

### 证据不足时的处理

- **missing_evidence**：说明证据不足，要求用户提供目标文件、README 段落或安装后验证记录；不要补全事实。
- **out_of_scope_request**：说明该任务超出当前 AI Context Pack 证据范围，并建议用户先查看 Human Manual 或真实安装后验证。
- **runtime_request**：给出安装前检查清单和命令来源，但不要替用户执行命令或声称已执行。
- **source_conflict**：同时展示冲突来源，标记为待核实，不要强行选择一个版本。

## Prompt Recipes

### 适配判断

- 目标：判断这个项目是否适合用户当前任务。
- 预期输出：适配结论、关键理由、证据引用、安装前可预览内容、必须安装后验证内容、下一步建议。

```text
请基于 trivy 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。
```

### 安装前体验

- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。
- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。

```text
请把 trivy 当作安装前体验资产，而不是已安装工具或真实运行环境。

请严格输出四段：
1. 先问我 3 个必要问题。
2. 给出一段“体验剧本”：用 [安装前可预览]、[必须安装后验证]、[证据不足] 三种标签展示它可能如何引导工作流。
3. 给出安装后验证清单：列出哪些能力只有真实安装、真实宿主加载、真实项目运行后才能确认。
4. 给出谨慎建议：只能说“值得继续研究/试装”“先补充信息后再判断”或“不建议继续”，不得替项目背书。

硬性边界：
- 不要声称已经安装、运行、执行测试、修改文件或产生真实结果。
- 不要写“自动适配”“确保通过”“完美适配”“强烈建议安装”等承诺性表达。
- 如果描述安装后的工作方式，必须使用“如果安装成功且宿主正确加载 Skill，它可能会……”这种条件句。
- 体验剧本只能写成“示例台词/假设流程”：使用“可能会询问/可能会建议/可能会展示”，不要写“已写入、已生成、已通过、正在运行、正在生成”。
- Prompt Preview 不负责给安装命令；如用户准备试装，只能提示先阅读 Quick Start 和 Risk Card，并在隔离环境验证。
- 所有项目事实必须来自 supported claim、evidence_refs 或 source_paths；inferred/unverified 只能作风险或待确认项。

```

### 角色 / Skill 选择

- 目标：从项目里的角色或 Skill 中挑选最匹配的资产。
- 预期输出：候选角色或 Skill 列表，每项包含适用场景、证据路径、风险边界和是否需要安装后验证。

```text
请读取 role_skill_index，根据我的目标任务推荐 3-5 个最相关的角色或 Skill。每个推荐都要说明适用场景、可能输出、风险边界和 evidence_refs。
```

### 风险预检

- 目标：安装或引入前识别环境、权限、规则冲突和质量风险。
- 预期输出：环境、权限、依赖、许可、宿主冲突、质量风险和未知项的检查清单。

```text
请基于 risk_card、boundaries 和 quick_start_candidates，给我一份安装前风险预检清单。不要替我执行命令，只说明我应该检查什么、为什么检查、失败会有什么影响。
```

### 宿主 AI 开工指令

- 目标：把项目上下文转成一次对话开始前的宿主 AI 指令。
- 预期输出：一段边界明确、证据引用明确、适合复制给宿主 AI 的开工前指令。

```text
请基于 trivy 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。
```

## 角色 / Skill 索引

- 共索引 62 个角色 / Skill / 项目文档条目。

- **Quick Start**（project_doc）：! GitHub Release release-img release ! Test test-img test ! Go Report Card go-report-img go-report ! License: Apache-2.0 license-img license ! GitHub Downloads github-downloads-img release ! Docker Pulls docker-pulls 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Readme**（project_doc）：This directory contains media assets, such as the Trivy logo. Assets under this directory are provided under the Creative Commons - BY 4.0 License. For more details, see here: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`brand/readme.md`
- **Integration Tests**（project_doc）：This directory contains integration tests for Trivy. These tests verify Trivy's behavior by running actual commands and comparing the output against golden files. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`integration/README.md`
- **Spring4Shell module**（project_doc）：This module provides a more in-depth investigation of Spring4Shell detection. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/module/spring4shell/README.md`
- **Trivy Scanner**（project_doc）：Trivy vulnerability scanner standalone installation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`helm/trivy/README.md`
- **Readme**（project_doc）：To recreate the test files: - Start a miniconda container: - In the container, initialize a conda environment: - Export conda package definitions out of the container: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`pkg/dependency/parser/conda/meta/testdata/README.md`
- **test**（project_doc）：Directory structure - integration - Integration test - testdata - This directory contains test images that are used in multiple unit tests 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`pkg/fanal/test/README.md`
- **AWS S3 bucket Terraform module**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`pkg/iac/scanners/terraform/parser/resolvers/testdata/terraform-aws-s3-bucket/README.md`
- **S3 bucket notification**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`pkg/iac/scanners/terraform/parser/resolvers/testdata/terraform-aws-s3-bucket/modules/notification/README.md`
- **S3 bucket object**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`pkg/iac/scanners/terraform/parser/resolvers/testdata/terraform-aws-s3-bucket/modules/object/README.md`
- **Troubleshooting**（project_doc）：Your scan may time out. Java takes a particularly long time to scan. Try increasing the value of the --timeout option such as --timeout 15m . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/references/troubleshooting.md`
- **Contributing**（project_doc）：See Issues https://trivy.dev/docs/latest/community/contribute/issue/ and Pull Requests https://trivy.dev/docs/latest/community/contribute/pr/ 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Docs**（project_doc）：Welcome to the Trivy documentation! Here you can find complete and thorough information about every aspect of Trivy, how to use it, features available, and configuration options. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/index.md`
- **Aqua Security is the home of Trivy**（project_doc）：Trivy is proudly maintained by Aqua Security https://aquasec.com . If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering. In this page you can find a high level comparison between Trivy Open Source and Aqua's commercial product. If you'd like to learn more or request a demo, click here to contact us ./contact.md . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/commercial/compare.md`
- **Contact**（project_doc）：.md-content .md-content inner a, h1 { display:none; } input.hs-input, textarea.hs-input { border: silver solid 1px !important; font-size: 0.8em; padding: 5px; } hbspt.forms.create { portalId: "1665891", formId: "a1d0c098-3b3a-40d8-afb4-e04ddb697afe" } ; 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/commercial/contact.md`
- **Contribute Rego Checks**（project_doc）：The following guide provides an overview of contributing checks to the default checks in Trivy. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/contribute/checks/overview.md`
- **Add Service Support**（project_doc）：A service refers to a service by a cloud provider. This section details how to add a new service to an existing provider. All contributions need to be made to the trivy repository https://github.com/aquasecurity/trivy/ . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/contribute/checks/service-support.md`
- **Discussions**（project_doc）：Discussions Thank you for taking interest in contributing to Trivy! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/contribute/discussion.md`
- **Issues**（project_doc）：Issues Thank you for taking interest in contributing to Trivy! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/contribute/issue.md`
- **Development**（project_doc）：Thank you for taking interest in contributing to Trivy! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/contribute/pr.md`
- **Add Vulnerability Advisory Source**（project_doc）：This guide walks through the process of adding a new vulnerability advisory source to Trivy. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/contribute/vulnerability-database/add-vulnerability-source.md`
- **Vulnerability Data Sources**（project_doc）：This section explains how Trivy's vulnerability database works and how to contribute new advisory data sources. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/contribute/vulnerability-database/overview.md`
- **Backporting Process**（project_doc）：This document outlines the backporting process for Trivy, including when to create patch releases and how to perform the backporting. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/maintainer/backporting.md`
- **Overview**（project_doc）：We use two labels help wanted help-wanted and good first issue good-first-issue to identify issues that have been specially groomed for new contributors. The good first issue label is a subset of help wanted label, indicating that members have committed to providing extra assistance for new contributors. All good first issue items also have the help wanted label. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/maintainer/help-wanted.md`
- **Pull Request Review Policy**（project_doc）：This document outlines the review policy for pull requests in the Trivy project. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/maintainer/pr-review.md`
- **Release Flow**（project_doc）：Overview Trivy adopts conventional commit messages conventional-commits , and Release Please release-please automatically creates a release PR https://github.com/googleapis/release-please?tab=readme-ov-file whats-a-release-pr based on the messages of the merged commits. This release PR is automatically updated every time a new commit is added to the release branch. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/maintainer/release-flow.md`
- **Triage**（project_doc）：Triage is an important part of maintaining the health of the trivy repo. A well organized repo allows maintainers to prioritize feature requests, fix bugs, and respond to users facing difficulty with the tool as quickly as possible. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/maintainer/triage.md`
- **Trivy Project Principles**（project_doc）：Trivy Project Principles This document outlines the guiding principles and governance framework for the Trivy project. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/principles.md`
- **CI/CD Integrations**（project_doc）：Azure DevOps Official Azure Devops https://azure.microsoft.com/en-us/products/devops/ overview is Microsoft Azure cloud native CI/CD service. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/ecosystem/cicd.md`
- **IDE and developer tools Integrations**（project_doc）：IDE and developer tools Integrations 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/ecosystem/ide.md`
- **Ecosystem**（project_doc）：Ecosystem Trivy is integrated into many popular tools and applications, so that you can easily add security to your workflow. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/ecosystem/index.md`
- **Production and cloud Integrations**（project_doc）：Kubernetes https://kubernetes.io/ is an open-source system for automating deployment, scaling, and management of containerized applications. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/ecosystem/prod.md`
- **Reporting**（project_doc）：DefectDojo Community DefectDojo can parse Trivy JSON reports. The parser supports deduplication and auto-close features. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/ecosystem/reporting.md`
- **FAQ**（project_doc）：tri is pronounced like tri gger, vy is pronounced like en vy . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/getting-started/faq.md`
- **First steps with Trivy**（project_doc）：Trivy is available in most common distribution channels. The complete list of installation options is available in the Installation ./installation.md page. Here are a few popular examples: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/getting-started/index.md`
- **Installing Trivy**（project_doc）：In this section you will find an aggregation of the different ways to install Trivy. Installation options are labeled as either "Official" or "Community". Official installations are developed by the Trivy team and supported by it. Community installations could be developed by anyone from the Trivy community, and collected here for your convenience. For support or questions about community installations, please conta… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/getting-started/installation.md`
- **Signature Verification**（project_doc）：All binaries and container images are signed by Cosign https://github.com/sigstore/cosign . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/getting-started/signature-verification.md`
- **Connectivity and Network considerations**（project_doc）：Connectivity and Network considerations 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/air-gap.md`
- **Embed in Dockerfile**（project_doc）：Scan your image as part of the build process by embedding Trivy in the Dockerfile. This approach can be used to update Dockerfiles currently using Aqua’s Microscanner microscanner . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/container/embed-in-dockerfile.md`
- **Unpacked Filesystem**（project_doc）：Scan an unpacked container image filesystem. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/container/unpacked-filesystem.md`
- **Modules**（project_doc）：!!! warning "EXPERIMENTAL" This feature might change without preserving backwards compatibility. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/modules.md`
- **Requirements**（project_doc）：Requirements None, Trivy uses Azure SDK for Go. You don't need to install az command. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/private-registries/acr.md`
- **Docker Hub**（project_doc）：See here ./index.md for the detail. You don't need to provide a credential when download from public repository. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/private-registries/docker-hub.md`
- **AWS private registry permissions**（project_doc）：Trivy uses AWS SDK. You don't need to install aws CLI tool. You can use AWS CLI's ENV Vars env-var . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/private-registries/ecr.md`
- **Requirements**（project_doc）：Requirements None, Trivy uses Google Cloud SDK. You don't need to install gcloud command. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/private-registries/gar.md`
- **Login**（project_doc）：Trivy can download images from a private registry without the need for installing Docker or any other 3rd party tools. This makes it easy to run within a CI process. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/private-registries/index.md`
- **if you want to use 80 port, use NonSSL**（project_doc）：BasicAuth server needs TRIVY USERNAME and TRIVY PASSWORD . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/private-registries/self.md`
- **Self-Hosting Trivy's Databases**（project_doc）：This document explains how to host Trivy's external dependencies ./air-gap.md in your own infrastructure to prevent external network access. If you haven't already, please familiarize yourself with the Databases document ../configuration/db.md that explains about the different databases used by Trivy and the different configuration options that control them. This guide assumes you are already familiar with the conce… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/self-hosting.md`
- **Telemetry Flags**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/telemetry-flags.md`
- **Usage Telemetry**（project_doc）：Trivy collects anonymous usage data in order to help us improve the product. This document explains what is collected and how you can control it. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/advanced/telemetry.md`
- **Built-in Compliance Reports**（project_doc）：!!! warning "EXPERIMENTAL" This feature might change without preserving backwards compatibility. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/compliance/compliance.md`
- **Custom Compliance Spec**（project_doc）：Trivy supports several different compliance specs. The details on compliance scanning with Trivy are provided in the compliance documentation ../../guide/compliance/compliance.md . All of the Compliance Specs currently available in Trivy can be found in the trivy-checks/pkg/specs/compliance/ directory Link https://github.com/aquasecurity/trivy-checks/tree/main/pkg/specs/compliance . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/compliance/contrib-compliance.md`
- **Cache**（project_doc）：- Cache of previous scans Scan cache . - Vulnerability Database trivy-db ^1 - Java Index Database trivy-java-db ^2 - Misconfiguration Checks misconf-checks ^3 - VEX Repositories ../supply-chain/vex/repo.md 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/configuration/cache.md`
- **Trivy Databases**（project_doc）：When you install Trivy, the installed artifact contains the scanner engine but is lacking relevant security information needed to make security detections and recommendations. These so called "databases" are automatically fetched and maintained by Trivy as needed, so normally you shouldn't notice or worry about them. This document elaborates on the database management mechanism and its configuration options. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/configuration/db.md`
- **Filtering**（project_doc）：Filtering Trivy provides various methods for filtering the results. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/configuration/filtering.md`
- **Configuration**（project_doc）：Configuration Trivy's settings can be configured in any of the following methods, which will apply in the following precedence: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/configuration/index.md`
- **Others**（project_doc）：Enable/Disable Scanners You can enable/disable scanners with the --scanners flag. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/configuration/others.md`
- **Reporting**（project_doc）：Format Trivy supports the following formats: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/configuration/reporting.md`
- **Selecting files for scanning**（project_doc）：When scanning a target image, code repository, etc , Trivy traverses all directories and files in that target and looks for known files to scan. For example, vulnerability scanner might look for /lib/apk/db/installed for Alpine APK scanning or requirements.txt file for Python pip scanning, and misconfiguration scanner might look for Dockerfile for Dockerfile scanning. This document explains how to control which file… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/configuration/skipping.md`
- **Ansible**（project_doc）：Trivy analyzes tasks in playbooks and roles for misconfigurations in cloud resources. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/coverage/iac/ansible.md`
- **Azure ARM Template**（project_doc）：Azure ARM Template Trivy supports the scanners listed in the table below. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/coverage/iac/azure-arm.md`
- **CloudFormation**（project_doc）：CloudFormation Trivy supports the scanners listed in the table below. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/guide/coverage/iac/cloudformation.md`

## 证据索引

- 共索引 80 条证据。

- **Quick Start**（documentation）：! GitHub Release release-img release ! Test test-img test ! Go Report Card go-report-img go-report ! License: Apache-2.0 license-img license ! GitHub Downloads github-downloads-img release ! Docker Pulls docker-pulls 证据：`README.md`
- **Readme**（documentation）：This directory contains media assets, such as the Trivy logo. Assets under this directory are provided under the Creative Commons - BY 4.0 License. For more details, see here: 证据：`brand/readme.md`
- **Integration Tests**（documentation）：This directory contains integration tests for Trivy. These tests verify Trivy's behavior by running actual commands and comparing the output against golden files. 证据：`integration/README.md`
- **Spring4Shell module**（documentation）：This module provides a more in-depth investigation of Spring4Shell detection. 证据：`examples/module/spring4shell/README.md`
- **Trivy Scanner**（documentation）：Trivy vulnerability scanner standalone installation. 证据：`helm/trivy/README.md`
- **Readme**（documentation）：To recreate the test files: - Start a miniconda container: - In the container, initialize a conda environment: - Export conda package definitions out of the container: 证据：`pkg/dependency/parser/conda/meta/testdata/README.md`
- **test**（documentation）：Directory structure - integration - Integration test - testdata - This directory contains test images that are used in multiple unit tests 证据：`pkg/fanal/test/README.md`
- **AWS S3 bucket Terraform module**（documentation）：AWS S3 bucket Terraform module 证据：`pkg/iac/scanners/terraform/parser/resolvers/testdata/terraform-aws-s3-bucket/README.md`
- **S3 bucket notification**（documentation）：S3 bucket notification 证据：`pkg/iac/scanners/terraform/parser/resolvers/testdata/terraform-aws-s3-bucket/modules/notification/README.md`
- **S3 bucket object**（documentation）：S3 bucket object 证据：`pkg/iac/scanners/terraform/parser/resolvers/testdata/terraform-aws-s3-bucket/modules/object/README.md`
- **Package**（package_manifest）：{ "name": "integration", "version": "1.0.0", "main": "index.js", "license": "MIT", "dependencies": { "jquery": "^3.2.1" }, "devDependencies": { "promise": "^8.0.3" } } 证据：`integration/testdata/fixtures/repo/yarn/package.json`
- **Package**（package_manifest）：{ "name": "bootstrap", "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", "version": "5.0.2", "config": { "version short": "5.0" }, "keywords": "css", "sass", "mobile-first", "responsive", "front-end", "framework", "web" , "workspaces": "packages/ ", "backend" , "homepage": "https://getbootstrap.com/", "author": "The Bootstrap Authors https://github.com/twbs/bootstrap/graphs/contributors ", "contributors": "Twitter, Inc." , "scripts": { "start": "npm-run-all --parallel watch docs-serve", "bundlewatch": "bundlewatch --config .bundlewatch.config.json", "css": "npm-run-all css-compile css-prefix css-rtl css-minify", "css-compile"… 证据：`pkg/dependency/parser/nodejs/packagejson/testdata/package.json`
- **Package**（package_manifest）：{ "name": "lodash", "version": "5.0.0", "license": "MIT", "private": true, "main": "lodash.js", "engines": { "node": " =4.0.0" }, "sideEffects": false, "scripts": { "style": "eslint .js .internal/ / .js", "test": "mocha -r esm test/ .test.js", "validate": "npm run style && npm run test" }, "devDependencies": { "mocha": "^5.2.0", "eslint": "^7.16.0", "eslint-plugin-import": "^2.22.1", "lodash": "4.17.20", "esm": "^3.2.25" } } 证据：`pkg/fanal/analyzer/language/nodejs/pkg/testdata/package.json`
- **Package**（package_manifest）：{ "name": "test", "version": "1.0.0", "main": "index.js", "license": "MIT", "devDependencies": { "foo-json": "npm:@types/jsonstream@0.8.33", "foo-uuid": "npm:@types/uuid" }, "dependencies": { "foo-debug": "npm:debug@^4.3", "foo-ms": "npm:ms" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/alias/package.json`
- **Package**（package_manifest）：{ "name": "90", "version": "1.0.0", "main": "index.js", "license": "MIT", "dependencies": { "js-tokens": "^2.0.0", "scheduler": "0.13.6" }, "devDependencies": { "prop-types": "15.7.2" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/happy/package.json`
- **Package**（package_manifest）：{ "dependencies": { "debug": "latest" }, "devDependencies" : { "js-tokens": "^9.0.0" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/latest-version/package.json`
- **Package**（package_manifest）：{ "name": "c", "version": "0.0.0", "dependencies": { "is-number": "^7.0.0" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/monorepo/c/package.json`
- **Package**（package_manifest）：{ "name": "yarn-workspace-test", "version": "1.0.0", "packageManager": "yarn@3.4.1", "private": true, "workspaces": "packages/ ", "c" , "devDependencies": { "prettier": "^2.8.8" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/monorepo/package.json`
- **Package**（package_manifest）：{ "name": "package1", "version": "0.0.0", "private": true, "dependencies": { "scheduler": "^0.23.0" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/monorepo/packages/package1/package.json`
- **Package**（package_manifest）：{ "private": true, "type": "module", "dependencies": { "is-odd": "^3.0.1" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/monorepo/packages/package2/package.json`
- **Package**（package_manifest）：{ "name": "util1", "version": "0.0.0", "dependencies": { "js-tokens": "^8.0.1" }, "devDependencies": { "prop-types": "^15.8.1" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/monorepo/packages/utils/util1/package.json`
- **Package**（package_manifest）：{ "name": "@test/bar-generators", "version": "0.0.1", "dependencies": { "hoek": "6.1.3" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/project-with-workspace-in-subdir/foo/bar/generators/package.json`
- **Package**（package_manifest）：{ "name": "@test/foo", "version": "1.0.0", "repository": "ssh://git@test.com/test.git/foo", "workspaces": "bar/ " , "main": "index.js", "license": "MIT" } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/project-with-workspace-in-subdir/foo/package.json`
- **Package**（package_manifest）：{ 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/wrong-packagejson/package.json`
- **Package**（package_manifest）：{ "name": "work", "version": "1.0.0", "main": "index.js", "license": "MIT", "packageManager": "yarn@3.4.1", "dependencies": { "is-callable": "1.2.7", "is-odd": "3.0.1" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/yarn-berry-node-modules/package.json`
- **Package**（package_manifest）：{ "packageManager": "yarn@1.22.19", "dependencies": { "@vue/compiler-sfc": "2.7.14" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/yarn-classic-licenses/package.json`
- **Package**（package_manifest）：{ "name": "yarn-3-licenses", "version": "1.0.0", "packageManager": "yarn@3.4.1", "dependencies": { "is-callable": "1.2.7", "is-odd": "^3.0.1" } } 证据：`pkg/fanal/analyzer/language/nodejs/yarn/testdata/yarn-licenses/package.json`
- **Troubleshooting**（documentation）：Your scan may time out. Java takes a particularly long time to scan. Try increasing the value of the --timeout option such as --timeout 15m . 证据：`docs/guide/references/troubleshooting.md`
- **Contributing**（documentation）：See Issues https://trivy.dev/docs/latest/community/contribute/issue/ and Pull Requests https://trivy.dev/docs/latest/community/contribute/pr/ 证据：`CONTRIBUTING.md`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`
- **Docs**（documentation）：Welcome to the Trivy documentation! Here you can find complete and thorough information about every aspect of Trivy, how to use it, features available, and configuration options. 证据：`docs/index.md`
- **Aqua Security is the home of Trivy**（documentation）：Trivy is proudly maintained by Aqua Security https://aquasec.com . If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering. In this page you can find a high level comparison between Trivy Open Source and Aqua's commercial product. If you'd like to learn more or request a demo, click here to contact us ./contact.md . 证据：`docs/commercial/compare.md`
- **Contact**（documentation）：.md-content .md-content inner a, h1 { display:none; } input.hs-input, textarea.hs-input { border: silver solid 1px !important; font-size: 0.8em; padding: 5px; } hbspt.forms.create { portalId: "1665891", formId: "a1d0c098-3b3a-40d8-afb4-e04ddb697afe" } ; 证据：`docs/commercial/contact.md`
- **Contribute Rego Checks**（documentation）：The following guide provides an overview of contributing checks to the default checks in Trivy. 证据：`docs/community/contribute/checks/overview.md`
- **Add Service Support**（documentation）：A service refers to a service by a cloud provider. This section details how to add a new service to an existing provider. All contributions need to be made to the trivy repository https://github.com/aquasecurity/trivy/ . 证据：`docs/community/contribute/checks/service-support.md`
- **Discussions**（documentation）：Discussions Thank you for taking interest in contributing to Trivy! 证据：`docs/community/contribute/discussion.md`
- **Issues**（documentation）：Issues Thank you for taking interest in contributing to Trivy! 证据：`docs/community/contribute/issue.md`
- **Development**（documentation）：Thank you for taking interest in contributing to Trivy! 证据：`docs/community/contribute/pr.md`
- **Add Vulnerability Advisory Source**（documentation）：This guide walks through the process of adding a new vulnerability advisory source to Trivy. 证据：`docs/community/contribute/vulnerability-database/add-vulnerability-source.md`
- **Vulnerability Data Sources**（documentation）：This section explains how Trivy's vulnerability database works and how to contribute new advisory data sources. 证据：`docs/community/contribute/vulnerability-database/overview.md`
- **Backporting Process**（documentation）：This document outlines the backporting process for Trivy, including when to create patch releases and how to perform the backporting. 证据：`docs/community/maintainer/backporting.md`
- **Overview**（documentation）：We use two labels help wanted help-wanted and good first issue good-first-issue to identify issues that have been specially groomed for new contributors. The good first issue label is a subset of help wanted label, indicating that members have committed to providing extra assistance for new contributors. All good first issue items also have the help wanted label. 证据：`docs/community/maintainer/help-wanted.md`
- **Pull Request Review Policy**（documentation）：This document outlines the review policy for pull requests in the Trivy project. 证据：`docs/community/maintainer/pr-review.md`
- **Release Flow**（documentation）：Overview Trivy adopts conventional commit messages conventional-commits , and Release Please release-please automatically creates a release PR https://github.com/googleapis/release-please?tab=readme-ov-file whats-a-release-pr based on the messages of the merged commits. This release PR is automatically updated every time a new commit is added to the release branch. 证据：`docs/community/maintainer/release-flow.md`
- **Triage**（documentation）：Triage is an important part of maintaining the health of the trivy repo. A well organized repo allows maintainers to prioritize feature requests, fix bugs, and respond to users facing difficulty with the tool as quickly as possible. 证据：`docs/community/maintainer/triage.md`
- **Trivy Project Principles**（documentation）：Trivy Project Principles This document outlines the guiding principles and governance framework for the Trivy project. 证据：`docs/community/principles.md`
- **CI/CD Integrations**（documentation）：Azure DevOps Official Azure Devops https://azure.microsoft.com/en-us/products/devops/ overview is Microsoft Azure cloud native CI/CD service. 证据：`docs/ecosystem/cicd.md`
- **IDE and developer tools Integrations**（documentation）：IDE and developer tools Integrations 证据：`docs/ecosystem/ide.md`
- **Ecosystem**（documentation）：Ecosystem Trivy is integrated into many popular tools and applications, so that you can easily add security to your workflow. 证据：`docs/ecosystem/index.md`
- **Production and cloud Integrations**（documentation）：Kubernetes https://kubernetes.io/ is an open-source system for automating deployment, scaling, and management of containerized applications. 证据：`docs/ecosystem/prod.md`
- **Reporting**（documentation）：DefectDojo Community DefectDojo can parse Trivy JSON reports. The parser supports deduplication and auto-close features. 证据：`docs/ecosystem/reporting.md`
- **FAQ**（documentation）：tri is pronounced like tri gger, vy is pronounced like en vy . 证据：`docs/getting-started/faq.md`
- **First steps with Trivy**（documentation）：Trivy is available in most common distribution channels. The complete list of installation options is available in the Installation ./installation.md page. Here are a few popular examples: 证据：`docs/getting-started/index.md`
- **Installing Trivy**（documentation）：In this section you will find an aggregation of the different ways to install Trivy. Installation options are labeled as either "Official" or "Community". Official installations are developed by the Trivy team and supported by it. Community installations could be developed by anyone from the Trivy community, and collected here for your convenience. For support or questions about community installations, please contact the original developers. 证据：`docs/getting-started/installation.md`
- **Signature Verification**（documentation）：All binaries and container images are signed by Cosign https://github.com/sigstore/cosign . 证据：`docs/getting-started/signature-verification.md`
- **Connectivity and Network considerations**（documentation）：Connectivity and Network considerations 证据：`docs/guide/advanced/air-gap.md`
- **Embed in Dockerfile**（documentation）：Scan your image as part of the build process by embedding Trivy in the Dockerfile. This approach can be used to update Dockerfiles currently using Aqua’s Microscanner microscanner . 证据：`docs/guide/advanced/container/embed-in-dockerfile.md`
- **Unpacked Filesystem**（documentation）：Scan an unpacked container image filesystem. 证据：`docs/guide/advanced/container/unpacked-filesystem.md`
- **Modules**（documentation）：!!! warning "EXPERIMENTAL" This feature might change without preserving backwards compatibility. 证据：`docs/guide/advanced/modules.md`
- **Requirements**（documentation）：Requirements None, Trivy uses Azure SDK for Go. You don't need to install az command. 证据：`docs/guide/advanced/private-registries/acr.md`
- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

## 宿主 AI 必须遵守的规则

- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`README.md`, `brand/readme.md`, `integration/README.md`
- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`README.md`, `brand/readme.md`, `integration/README.md`

## 用户开工前应该回答的问题

- 你准备在哪个宿主 AI 或本地环境中使用它？
- 你只是想先体验工作流，还是准备真实安装？
- 你最在意的是安装成本、输出质量、还是和现有规则的冲突？

## 验收标准

- 所有能力声明都能回指到 evidence_refs 中的文件路径。
- AI_CONTEXT_PACK.md 没有把预览包装成真实运行。
- 用户能在 3 分钟内看懂适合谁、能做什么、如何开始和风险边界。

---

## Doramagic Context Augmentation

下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。

## Human Manual 骨架

使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。

宿主 AI 硬性规则：
- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。
- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。
- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。

- **Trivy 概览与系统架构**：importance `high`
  - source_paths: cmd/trivy/main.go, pkg/commands/app.go, pkg/commands/artifact/run.go, pkg/fanal/artifact/artifact.go, README.md
- **扫描目标、依赖解析与漏洞检测**：importance `high`
  - source_paths: pkg/fanal/analyzer/all/import.go, pkg/detector/library/detect.go, pkg/detector/ospkg/detect.go, pkg/dependency/parser/all/import.go, pkg/iac/scanners/scanner.go
- **运行模式、配置、数据库与故障排查**：importance `high`
  - source_paths: pkg/commands/server/run.go, pkg/db/db.go, pkg/javadb/client.go, pkg/cache/cache.go, pkg/remote/remote.go
- **报告输出、SBOM、VEX 与供应链集成**：importance `high`
  - source_paths: pkg/report/writer.go, pkg/report/sarif.go, pkg/report/cyclonedx/cyclonedx.go, pkg/report/spdx/spdx.go, pkg/report/template.go

## Repo Inspection Evidence / 源码检查证据

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `13de603dce17f5c6114a010d6aed6a440993edb0`
- inspected_files: `Dockerfile`, `README.md`, `docs/commercial/compare.md`, `docs/commercial/contact.md`, `docs/community/contribute/checks/overview.md`, `docs/community/contribute/checks/service-support.md`, `docs/community/contribute/discussion.md`, `docs/community/contribute/issue.md`, `docs/community/contribute/pr.md`, `docs/community/contribute/vulnerability-database/add-vulnerability-source.md`, `docs/community/contribute/vulnerability-database/overview.md`, `docs/community/maintainer/backporting.md`, `docs/community/maintainer/help-wanted.md`, `docs/community/maintainer/pr-review.md`, `docs/community/maintainer/release-flow.md`, `docs/community/maintainer/triage.md`, `docs/community/principles.md`, `docs/ecosystem/cicd.md`, `docs/ecosystem/ide.md`, `docs/ecosystem/index.md`

宿主 AI 硬性规则：
- 没有 repo_clone_verified=true 时，不得声称已经读过源码。
- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。
- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。

## Doramagic Pitfall Constraints / 踩坑约束

这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。

### Constraint 1: 涉及密钥、隐私或敏感领域

- Trigger: 项目文本出现 secret/private key/privacy/trading/finance 等敏感关键词。
- Host AI rule: 补敏感数据流、密钥存储和权限边界审查。
- Why it matters: 金融、交易、隐私和密钥场景必须比普通工具更保守。
- Evidence: packet_text.keyword_scan | https://github.com/aquasecurity/trivy | matched secret / private key / privacy / trading / finance keyword
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 依赖 Docker 环境

- Trigger: 安装/运行入口包含 Docker 命令：docker run aquasec/trivy
- Host AI rule: 标注 Docker 前置条件，并提供非 Docker 路径或失败提示。
- Why it matters: 非工程用户可能没有 Docker，启动成本明显增加。
- Evidence: identity.distribution | https://github.com/aquasecurity/trivy | docker run aquasec/trivy
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 来源证据：feat(misconf): add CloudFront standard logging v2 support to AVD-AWS-0010

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：feat(misconf): add CloudFront standard logging v2 support to AVD-AWS-0010
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/aquasecurity/trivy/issues/10622 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 能力判断依赖假设

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: 将假设转成下游验证清单。
- Why it matters: 假设不成立时，用户拿不到承诺的能力。
- Evidence: capability.assumptions | https://github.com/aquasecurity/trivy | README/documentation is current enough for a first validation pass.
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 运行可能依赖外部服务

- Trigger: 项目说明出现 external service/cloud/webhook/database 等运行依赖关键词。
- Host AI rule: 确认是否有离线 demo、mock 数据或可替代服务。
- Why it matters: 本地安装成功不等于能力可用，外部服务不可用会阻断体验。
- Evidence: packet_text.keyword_scan | https://github.com/aquasecurity/trivy | matched external service / cloud / webhook / database keyword
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 维护活跃度未知

- Trigger: 未记录 last_activity_observed。
- Host AI rule: 补 GitHub 最近 commit、release、issue/PR 响应信号。
- Why it matters: 新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。
- Evidence: evidence.maintainer_signals | https://github.com/aquasecurity/trivy | last_activity_observed missing
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

- Trigger: no_demo
- Evidence: downstream_validation.risk_items | https://github.com/aquasecurity/trivy | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 8: 存在评分风险

- Trigger: no_demo
- Why it matters: 风险会影响是否适合普通用户安装。
- Evidence: risks.scoring_risks | https://github.com/aquasecurity/trivy | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 9: 来源证据：bug: project dependencies are not extracted from pnpm-lock.yaml with multiple YAML documents (pnpm 11)

- Trigger: GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：bug: project dependencies are not extracted from pnpm-lock.yaml with multiple YAML documents (pnpm 11)
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/aquasecurity/trivy/issues/10859 | 来源讨论提到 node 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 10: issue/PR 响应质量未知

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: 抽样最近 issue/PR，判断是否长期无人处理。
- Why it matters: 用户无法判断遇到问题后是否有人维护。
- Evidence: evidence.maintainer_signals | https://github.com/aquasecurity/trivy | issue_or_pr_quality=unknown
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
