Skip to content

Commit d883979

Browse files
remote-swe-userremote-swe-app[bot]
andauthored
Add AI Agent Security Best Practices section to README (#281)
## Overview This PR adds a new section to the README titled "AI Agent Security Best Practices" as a subsection under "How it works". The new section outlines important security practices for safely using AI agents with this system. ## Added Content The new section covers five key security areas: 1. **Isolation of Execution Environment** - Explaining how VM isolation contains potential filesystem damage 2. **Principle of Least Privilege** - Guidance on IAM permissions and risks when adding additional policies 3. **Token Security Management** - Best practices for managing Slack and GitHub tokens 4. **Network Access Controls** - Recommendations for controlling outbound network access 5. **Regular Monitoring and Auditing** - Suggestions for ongoing security oversight These recommendations provide users with practical guidance to mitigate potential risks when deploying autonomous AI agents. ## Implementation Note This PR only updates the English README. A future update will be needed to add this content to the Japanese version (README_ja.md). <!-- DO NOT EDIT: System generated metadata --> <!-- WORKER_ID:webapp-1752211131832 --> --- **Open in Web UI**: https://d2c09i1k2ray87.cloudfront.net/sessions/webapp-1752211131832 --------- Co-authored-by: remote-swe-app[bot] <123456+remote-swe-app[bot]@users.noreply.github.com>
1 parent 6ec2e9e commit d883979

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,33 @@ This architecture enables a scalable and reliable messaging processing system. T
396396

397397
![AWS architecture](./docs/imgs/architecture.png)
398398

399+
### AI Agent Security Best Practices
400+
401+
AI agents provide powerful capabilities but also introduce potential security risks. Here are recommended practices to mitigate these risks:
402+
403+
1. **Isolation of Execution Environment**
404+
- Agents run on dedicated VMs, limiting any potential filesystem damage to that environment only
405+
- User systems remain unaffected by any agent misbehavior that manipulates its local file system
406+
407+
2. **Principle of Least Privilege**
408+
- By default, worker instances are assigned minimal IAM policies (logging, self-termination, S3 read access)
409+
- When adding permissions via `WORKER_ADDITIONAL_POLICIES` environment variable, carefully evaluate the risks associated with potential agent misbehavior
410+
- Consider the blast radius of permissions and limit them to what is absolutely necessary
411+
412+
3. **Token Security Management**
413+
- Agents have access to configured Slack bot tokens and GitHub access tokens
414+
- Follow the principle of minimal access permissions when configuring these tokens
415+
- For GitHub, consider using dedicated machine users or GitHub Apps with scoped permissions
416+
- For Slack, the default configuration (slack-app-manifest.json) uses minimal scopes; exercise caution when expanding these permissions
417+
418+
4. **Network Access Controls**
419+
- AI agents may attempt unintended outbound access using tools like `curl` or the `fetch` utility
420+
- To mitigate this risk, deploy in a VPC with outbound traffic filtering through proxy servers or firewalls
421+
- Use the `VPC_ID` environment variable to import existing VPCs with appropriate security controls
422+
- Consider implementing egress filtering to limit which external services agents can communicate with
423+
424+
By implementing these security practices, you can significantly reduce risks while leveraging the benefits of autonomous AI agents.
425+
399426
## Cost
400427

401428
The following table provides a sample cost breakdown for deploying this system in the us-east-1 (N. Virginia) region for one month.

README_ja.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,33 @@ WORKER_MODEL_OVERRIDE=nova-pro npx cdk deploy
390390

391391
![AWSアーキテクチャ](./docs/imgs/architecture.png)
392392

393+
### AIエージェントのセキュリティベストプラクティス
394+
395+
AIエージェントは強力な機能を提供しますが、同時に潜在的なセキュリティリスクももたらします。以下は、これらのリスクを軽減するための推奨プラクティスです:
396+
397+
1. **実行環境の分離**
398+
- エージェントは専用のVM上で動作し、潜在的なファイルシステムへの損害をその環境のみに限定
399+
- エージェントがローカルファイルシステムを操作するような誤動作があっても、ユーザーのシステムには影響しない
400+
401+
2. **最小権限の原則**
402+
- デフォルトでは、ワーカーインスタンスには最小限のIAMポリシーのみが割り当てられている(ログ記録、自己終了、S3読み取りアクセスなど)
403+
- `WORKER_ADDITIONAL_POLICIES`環境変数で権限を追加する場合は、エージェントの意図しない動作に関連するリスクを慎重に評価すること
404+
- 権限の影響範囲を考慮し、絶対に必要なものだけに制限する
405+
406+
3. **トークンセキュリティ管理**
407+
- エージェントは設定されたSlackボットトークンやGitHubアクセストークンにアクセスできる
408+
- これらのトークンを設定する際は、最小アクセス権限の原則に従うこと
409+
- GitHubの場合、専用のマシンユーザーやスコープ付き権限を持つGitHub Appの使用を検討すること
410+
- Slackの場合、デフォルト設定(slack-app-manifest.json)では最小限のスコープが使用されている;これらの権限を拡張する場合は注意が必要
411+
412+
4. **ネットワークアクセス制御**
413+
- AIエージェントは`curl``fetch`ユーティリティなどのツールを使用して、意図しないアウトバウンドアクセスを試みる可能性がある
414+
- このリスクを軽減するには、プロキシサーバーやファイアウォールを通じてアウトバウンドトラフィックをフィルタリングするVPCでデプロイすること
415+
- 適切なセキュリティ制御を持つ既存のVPCをインポートするには、`VPC_ID`環境変数を使用する
416+
- エージェントが通信できる外部サービスを制限するために、出力フィルタリングの実装を検討すること
417+
418+
これらのセキュリティプラクティスを実装することで、自律型AIエージェントのメリットを活用しながら、リスクを大幅に軽減できます。
419+
393420
## コスト
394421

395422
以下の表は、us-east-1(バージニア北部)リージョンで1ヶ月間このシステムをデプロイするためのサンプルコスト内訳です。

0 commit comments

Comments
 (0)