feat: security analysis guidelines - #44
Conversation
…aire, threat model, enforcement mapping) Signed-off-by: Sai Sree Laya Chukkappalli <saisree@dhcp-9-31-104-106.watson.ibm.com>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@dhcp-9-31-107-214.watson.ibm.com>
…tion after each step) or Autonomous (all four steps back-to-back, one final review at the end Signed-off-by: Sai Sree Laya Chukkappalli <saisree@dhcp-9-31-107-214.watson.ibm.com>
… threat vectors Signed-off-by: Sai Sree Laya Chukkappalli <saisree@dhcp-9-31-107-214.watson.ibm.com>
…t existing Signed-off-by: Sai Sree Laya Chukkappalli <saisree@dhcp-9-31-107-214.watson.ibm.com>
…d list against the target's existing Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
…y analysis steps Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
…' into sc/security-analysis
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@dhcp-9-31-107-214.watson.ibm.com>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@dhcp-9-31-107-214.watson.ibm.com>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@dhcp-9-31-107-214.watson.ibm.com>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
araujof
left a comment
There was a problem hiding this comment.
Can you please address the following? Then, I think we should be good to merge.
-
Failed/generated state committed: The PR contains 663 files, including 561 generated test cases, red-team outputs, an SQLite DB, scorecard artifacts, and unreachable.dot. Can you double check if all of these are indeed needed/useful to be in the PR? @dhl123 thoughts on this?
-
Fail-open default policy: assets/policy.rego allows whenever no deny rule matches, without validating the request envelope or tool name. For example, a bogus delete_everything request returns
allow: true. Is that intended? I wonder if we even want to have that policy.rego stored there under assets. It should probably go with one of our examples. @dhl123 thoughts?
|
I had a pass on the PR, below is my suggestions: Please delete/empty the following files, they are intermediate files:
Questions on changes to existing code
Questions on the artifacts produced by the security analysis
General suggestionThe security analysis currently injects 4–5 long skill files into SKILL.md, each includes many steps smith need to follow and analyze. These files almost takes the majority of all skill files smith will read. Loading that much text will overwrite the running context and adds noise to every decision the agent makes in the session as well, which hurts both clarity and determinism. Since this analysis depends only on guidance.txt and not on the agent's runtime logic, one of the following would be great
|
|
Please also use Do not commit test cases, I will regenerate and reshape them |
|
I checked the commits in the PR. All non-merge commits already have the |
…ool_definitions Signed-off-by: Sai Sree Laya Chukkappalli <saisree@Sais-MacBook-Pro.local>
Signed-off-by: Sai Sree Laya Chukkappalli <saisreelaya.chukkapalli@gmail.com>
Signed-off-by: Sai Sree Laya Chukkappalli <saisreelaya.chukkapalli@gmail.com>
Signed-off-by: Sai Sree Laya Chukkappalli <saisreelaya.chukkapalli@gmail.com>
Addressed:
Please also update
If we want the full HR-agent guidance to be used end to end,
|
8560487 to
d200186
Compare
Signed-off-by: Sai Sree Laya Chukkappalli <saisreelaya.chukkapalli@gmail.com>
Signed-off-by: Sai Sree Laya Chukkappalli <saisreelaya.chukkapalli@gmail.com>
Signed-off-by: Sai Sree Laya Chukkappalli <saisreelaya.chukkapalli@gmail.com>
Summary
Adds the guidelines-security-analysis skill: a 4-step pipeline (architecture analysis -> policy guidance questionnaire -> threat model -> enforcement mapping) that turns a target MCP server's source and OWASP Top 10 for Agentic AI Security (ASI01–ASI10) catalog into a scoped set of security guidelines for OPA policy.
Closes: #issue-number
Changes
opa_policy/guidelines-security-analysis/guidelines-security-analysis.md— new orchestrator doc that sequences the 4 stepsopa_policy/guidelines-security-analysis/owasp/architecture_analysis.md— maps an MCP server's layers, trust boundaries, and OPA enforcement points intoarchitecture.mdopa_policy/guidelines-security-analysis/owasp/policy_guidance_questionnaire.md— derives a 22-question policy-intent questionnaire fromarchitecture.md+guidance.txt/system_vars.json/tool_definitions.jsonwhere presentopa_policy/guidelines-security-analysis/owasp/threat_model.md— evaluates all 10 ASI categories against the tool using a three-question applicability test, sourced live from the catalog rather than hardcodedopa_policy/guidelines-security-analysis/owasp/enforcement_mapping.md— maps each threat instance to an enforcement layer (OPA vs. agent/tool/infra) and produces plain-English policy-rule requirements grounded in the catalog'smitigationssrc/smith/data/owasp_10_ai_catalog.json— new repo-relative data file: the OWASP Top 10 for Agentic AI Security catalog (ASI01–ASI10), single source of truth for category names, descriptions, impact, mitigations, and attack scenariosAll four step docs share a consistent "Authoritative Paths" contract: inputs are read from ONLY the named files under
<TARGET_AGENT_PATH>/smith/guidelines-security-analysis/(or the repo-relative catalog path), with an explicit stop-and-ask instruction if a required file is missing.Checks
make cipasses (lint, Rego lint, license headers, build smoke)make testpasses (policy scorecard — needed if policy behavior changed) — not applicable, noassets/policy.regochanges in this PRCHANGELOG.mdupdated under## [Unreleased](if user-facing)git commit -s) — verified viagit log -1 --format='%B',Signed-off-bypresentNotes (optional)
Base branch should be
hl/promptfoo_config_auto, notmain— this skill was built on top of unreleased work already on that branch. Confirmed clean:git diff --stat hl/promptfoo_config_auto..feat/guidelines-security-analysisshows exactly these 6 files (1392 insertions, 0 deletions), nopolicy_build/CLI/example files leaking in.