[request]: Read-only AWS security posture review custom agent (12 artifacts, Chinese)

オープン
#313 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
22/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
aws, markdown
領域
cloud, security

調査の方向性

Start with CONTRIBUTING.md for the language rule for custom agents and the Domain SME sign-off requirement, then check the proposed custom-agents/aws-security-posture-review/ layout and cloudformation/devops-agent-skill-policies for the policy toggle. Done means maintainers have answered the language question and the SME route, and the agent's 12 artifacts and iam-extra-readonly-policy.json are reviewed against the read-only constraint.

索引モデルが issue の本文から書いたものです。

説明

Select the type of tool this is related to
  • Skill
  • Custom agent
  • MCP server
  • IaC (Infrastructure as Code) template
  • Other
Tell us about your request

A read-only custom agent that reviews one AWS account's security posture and writes 12 Markdown artifacts: one overview plus 11 per-domain parts (baseline services, GuardDuty / Access Analyzer, network exposure, network controls, storage, S3 buckets, compute, containers, IAM, change attribution via CloudTrail, WAF). The system prompt, the generated reports and the README are written in Chinese. Before I open the PR I'd like to confirm that a Chinese-language custom agent is acceptable in this repository, and whether an English prompt would be required instead (the full prompt is 49,936 characters, so a translation would not fit the 50,000-character system prompt quota).

Which AWS service(s) is this for?

IAM, S3, EC2, VPC, Network Firewall, ELB, API Gateway, CloudFront, Route 53, EBS, KMS, RDS, DynamoDB, ElastiCache, EFS, Backup, Secrets Manager, Lambda, ECR, SNS, SQS, EventBridge, EKS, ECS, GuardDuty, Security Hub, Config, Inspector, Macie, IAM Access Analyzer, CloudTrail, WAF, Trusted Advisor

What problem are you trying to solve?

Security and operations teams need a periodic, evidence-backed inventory of an account's security posture, not a list of generic recommendations. Asking DevOps Agent in chat gives one answer per question, with no fixed structure, no per-finding evidence and no record of what could not be checked. Operators end up re-running the same dozen questions by hand and still cannot tell a verified finding from a guess. This agent produces the same 12 artifacts every run, each finding with resource ID, Region, the API evidence it came from and a severity, and every item the agent could not read listed explicitly as "not verified" with the reason.

How should it behave?
  • Intent of the system prompt: the lead agent is a dispatcher and indexer only. It sends 11 sub-agents, one per domain, each writing its own artifact with a fixed structure (findings table -> how to fix with console steps -> scope checked -> not verified). The lead agent then writes the overview, whose severity tables are copied mechanically from the sub-agents' tables (no re-judging, no summarising).
  • Hard constraints in the prompt: read-only (Describe / Get / List / Lookup only, refuses write requests even if asked), no Kubernetes data plane, no fabricated findings (every finding must come from an API call made in this run), English artifact titles.
  • Single-part mode: when the task names one domain, only that part is produced.
  • "Do not modify" list: resources named in the task are still reviewed, but "how to fix" starts with "confirm with the resource owner first".
  • Tools: exactly 11 read tools — use_aws, create_or_update_artifact, verify_aws_claim, lookup_cloudtrail_events, query_cloudwatch_logs, list_resources, list_resources_by_type, list_resource_details, list_resource_history, get_topology_map, get_resource_edges. No use_kubectl, no write tools.
  • Skills / memory stores: none.
Which DevOps Agent functionalities is this relevant to?

Custom agent on-demand runs (Run with prompt), scheduled agent runs

Does this need extra permissions?

Yes. 36 read-only actions not covered by AIDevOpsAgentAccessPolicy, as an inline policy on the Agent Space role: IAM credential/password-policy/MFA/group listing (iam:ListAccessKeys, GetAccessKeyLastUsed, GetCredentialReport, GenerateCredentialReport, GetAccountPasswordPolicy, GetAccountSummary, ListMFADevices, ListGroups, ListAttachedGroupPolicies, ListGroupPolicies, ListAttachedUserPolicies, ListUserPolicies, ListInstanceProfiles, ListSAMLProviders, ListGroupsForUser, ListPolicies, ListServiceSpecificCredentials), s3:GetAccountPublicAccessBlock, s3:GetReplicationConfiguration, ec2:GetEbsEncryptionByDefault, elasticfilesystem:Describe* (6 actions), trustedadvisor:* read + support:DescribeTrustedAdvisor* (6 actions, Business Support or higher only), sso:DescribePermissionSet, inspector2:BatchGetAccountStatus, guardduty:GetFindingsStatistics, access-analyzer:GetFinding. All Describe / Get / List, Resource "*". The agent runs without them; affected checks are reported as "not verified". Happy to add it as a toggle in cloudformation/devops-agent-skill-policies if that is the preferred place.

Are you currently working around this?

Running this agent from a private repository in our own test account.

Have you checked for existing tools?
  • I've searched existing issues, skills, custom agents, and MCP servers, and this isn't already covered or extendable.
  • I've confirmed DevOps Agent can't already do this natively (I tested it).

(unified-security-cost-optimizer covers the cost of security services, aws-operation-review covers EKS/RDS/Bedrock/SageMaker operational reviews; neither produces an account-wide security posture review.)

Would you like to build it?
  • I'm willing to contribute this myself (see CONTRIBUTING.md).
  • I'm suggesting it for someone else to build.
Additional context

Open question for maintainers: language. The prompt and the artifacts are in Chinese. If English is required, I will need guidance on how to fit the content within the 50,000-character quota (one option is splitting the per-domain check lists into a companion skill). Proposed directory: custom-agents/aws-security-posture-review/ with SYSTEM_PROMPT.md, README.md (Chinese with an English summary at the top), CHANGELOG.md and iam-extra-readonly-policy.json.

Native chat comparison (2026-11-25, same test account, same Agent Space, questions prefixed "strictly read-only", 8 chat runs over 5 questions):

  • Asked DevOps Agent chat the same questions the agent's parts answer: Q1 IAM (users without MFA, cross-account trust roles, Action:* / iam:* customer policies) x2, Q2 security groups open to 0.0.0.0/0 on 22/3389/3306/5432/6379 with ENI attachment x2, Q3 S3 Block Public Access and Principal:* bucket policies x2, Q4 Lambda Function URL AuthType NONE (all functions, no sampling) plus EKS public endpoint / control-plane logging x1, Q5 GuardDuty / Security Hub / Config per Region plus CloudTrail multi-Region, validation and KMS x1. Answers were compared with the agent's Part 6 / 3A / 4B / 5 / 2A from the latest full run.
  • Scope is not stable: the two Q2 runs, sent 3 seconds apart with identical text, covered 1 Region (23 security groups, 40 s) vs 19 Regions (83 security groups, 6 min). Q3 x2 was consistent (127 buckets, same 3 Allow / 27 Deny policies) and Q4 / Q5 covered all 19 Regions in one run, so the drift shows up when the question does not spell out the Region scope. The agent's prompt fixes the scope to all enabled Regions and reports per-Region counts.
  • Arithmetic drift: Q1 run 1 reported 344 roles scanned (100+100+100+100+44), run 2 reported 444; the live count is 444.
  • Chat skipped inline role policies in both Q1 runs (self-reported). The agent scans them and reported two high findings (Action:* and iam:PutUserPolicy on roles) that chat did not surface.
  • Chat answers only what was asked: Q4 did not mention the 5 functions on end-of-life runtimes and Q5 did not mention Inspector, Macie or Access Analyzer, all of which the agent's Part 5 / Part 2A report as findings. Chat gives no per-finding evidence column, no severity and no remediation steps in any of the 8 runs; its table layout changed between runs and one run printed its final answer twice.
  • Where chat did well: the 20 cross-account roles, the single Function URL with AuthType NONE, the 71/71 Lambda coverage, the GuardDuty / Security Hub / Config / CloudTrail status and the S3 results all matched the agent exactly; Q2 run 2 went deeper on SG references and launch templates; chat was honest about its own limits.
  • Cost of the comparison: ≈$21 recorded so far (0.684 agent-hour at the observed $30/agent-hour; the last run may not be metered yet, final CE figure pending). Raw transcripts are kept locally and can be shared on request.

Domain SME: I do not currently have a candidate for the Domain SME sign-off that CONTRIBUTING.md requires on the PR ("a named subject-matter expert, other than the author"). Following the "If you cannot find one" guidance ("Raise it in your tool request issue ... Maintainers can often reach the relevant service team or an internal specialist"), I'd like to ask the maintainers to help route a reviewer with hands-on AWS security operations experience.
What the SME would need to verify: that the per-domain check items cover the domain, that the severity grading is consistent across parts, and that iam-extra-readonly-policy.json contains read-only actions only.

主要言語
Python
スター
143
フォーク
140
平均マージ
2日 12時間
マージ済み PR(30日)
70

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/tools-for-devops-agent のほかの issue

aws/tools-for-devops-agent の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。