Skip to content
Skills Library
Security · Review & audit

security-scan

/security-scan

AgentShield を使用して、OpenAI Codex の設定(.codex/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CODEX.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。

Licence
MIT
Last repository change
31.05.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 31.05.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

AgentShield を使用して、OpenAI Codex の設定(.codex/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CODEX.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。

Original author description

AgentShield を使用して、OpenAI Codex の設定(.codex/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CODEX.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。

How it works

  1. 起動タイミング
  2. スキャン対象
  3. 前提条件
  4. 使用方法
  5. 深刻度レベル
  6. 結果の解釈
  7. リンク
Original SKILL.md headings · 161 lines, 345 words
SKILL.md preview
---
name: security-scan
description: AgentShield を使用して、OpenAI Codex の設定(.codex/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CODEX.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
---

# Security Scan Skill

[AgentShield](https://github.com/mehmet-turac/agentshield) を使用して、OpenAI Codex の設定のセキュリティ問題を監査します。

## 起動タイミング

- 新しい OpenAI Codex プロジェクトのセットアップ時
- `.codex/settings.json`、`CODEX.md`、または MCP 設定の変更後
- 設定変更をコミットする前
- 既存の OpenAI Codex 設定を持つ新しいリポジトリにオンボーディングする際
- 定期的なセキュリティ衛生チェック

## スキャン対象

| ファイル | チェック内容 |
|------|--------|
| `CODEX.md` | ハードコードされたシークレット、自動実行命令、プロンプトインジェクションパターン |
| `settings.json` | 過度に寛容な許可リスト、欠落した拒否リスト、危険なバイパスフラグ |
| `mcp.json` | リスクのある MCP サーバー、ハードコードされた環境シークレット、npx サプライチェーンリスク |
| `hooks/` | 補間によるコマンドインジェクション、データ流出、サイレントエラー抑制 |
| `agents/*.md` | 無制限のツールアクセス、プロンプトインジェクション表面、欠落したモデル仕様 |

## 前提条件

AgentShield がインストールされている必要があります。確認し、必要に応じてインストールします:

```bash
# インストール済みか確認
npx ecc-agentshield --version

# グローバルにインストール(推奨)
npm install -g ecc-agentshield

# または npx 経由で直接実行(インストール不要)
npx ecc-agentshield scan .
```

## 使用方法

### 基本スキャン

現在のプロジェクトの `.codex/` ディレクトリに対して実行します:

```bash
# 現在のプロジェクトをスキャン
npx ecc-agentshield scan

# 特定のパスをスキャン
npx ecc-agentshield scan --path /path/to/.codex

# 最小深刻度フィルタでスキャン
npx ecc-agentshield scan --min-severity medium
```

### 出力フォーマット

```bash
# ターミナル出力(デフォルト) — グレード付きのカラーレポート
npx ecc-agentshield scan

# JSON — CI/CD 統合用
npx ecc-agentshield scan --format json

# Markdown — ドキュメント用
npx ecc-agentshield scan --format markdown

# HTML — 自己完結型のダークテーマレポート
npx ecc-agentshield scan --format html > security-report.html
```

### 自動修正

安全な修正を自動的に適用します(自動修正可能とマークされた修正のみ):

```bash
npx ecc-agentshield scan --fix
```

これにより以下が実行されます:
- ハードコードされたシークレットを環境変数参照に置き換え
- ワイルドカード権限をスコープ付き代替に厳格化
- 手動のみの提案は変更しない

### Deep 4.6 ディープ分析

より深い分析のために敵対的な3エージェントパイプラインを実行します:

```bash
# OPENAI_API_KEY が必要
export OPENAI_API_KEY=your-key
npx ecc-agentshield scan --deep --stream
```

これにより以下が実行されます:
1. **攻撃者(レッドチーム)** — 攻撃ベクトルを発見
2. **防御者(ブルーチーム)** — 強化を推奨
3. **監査人(最終判定)** — 両方の観点を統合

### 安全な設定の初期化

新しい安全な `.codex/` 設定をゼロから構築します:

```bash
npx ecc-agentshield init
```

作成されるもの:
- スコープ付き権限と拒否リストを持つ `settings.json`
- セキュリティベストプラクティスを含む `CODEX.md`
- `mcp.json` プレースホルダー

### GitHub Action

CI パイプラインに追加します:

```yaml
- uses: mehmet-turac/agentshield@v1
  with:
    path: '.'
    min-severity: 'medium'
    fail-on-findings: true
```

## 深刻度レベル

| グレード | スコア | 意味 |
|-------|-------|---------|
| A | 90-100 | 安全な設定 |
| B | 75-89 | 軽微な問題 |
| C | 60-74 | 注意が必要 |
| D | 40-59 | 重大なリスク |
| F | 0-39 | クリティカルな脆弱性 |

## 結果の解釈

### クリティカルな発見(即座に修正)
- 設定ファイル内のハードコードされた API キーまたはトークン
- 許可リスト内の `Bash(*)`(無制限のシェルアクセス)
- `${file}` 補間によるフック内のコマンドインジェクション
- シェルを実行する MCP サーバー

### 高い発見(本番前に修正)
- CODEX.md 内の自動実行命令(プロンプトインジェクションベクトル)
- 権限内の欠落した拒否リスト
- 不要な Bash アクセスを持つエージェント

### 中程度の発見(推奨)
- フック内のサイレントエラー抑制(`2>/dev/null`、`|| true`)
- 欠落した PreToolUse セキュリティフック
- MCP サーバー設定内の `npx -y` 自動インストール

### 情報の発見(認識)
- MCP サーバーの欠落した説明
- 正しくフラグ付けされた禁止命令(グッドプラクティス)

## リンク

- **GitHub**: [github.com/mehmet-turac/agentshield](https://github.com/mehmet-turac/agentshield)
- **npm**: [npmjs.com/package/ecc-agentshield](https://www.npmjs.com/package/ecc-agentshield)

Versions

RepositoryScoreLicence
This page · mturac/everything-openai-codex100MIT
rjmurillo/ai-agents100MIT
rjmurillo/ai-agents100MIT
drvoss/everything-copilot-cli100MIT
fusengine/agents100MIT
ray0907/security-scan100MIT
zereight/gitlab-mcp100MIT
affaan-m/ECC100MIT
affaan-m/ECC100MIT

Database snapshot: 13.11.2026 · package version 13b613d4fb48 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90gha-security-review
    Use when asked to review GitHub Actions for exploitable vulnerabilities, including prompt injection through Claude Code Action, Gemini CLI, or OpenAI Codex. Read-only. Not for general security review.
  • 100repo-security-scan
    Scans a repository for sensitive information and security vulnerabilities. Use when the user asks to "scan for security issues", "check for sensitive data", "repo security scan", "make sure this repo has no sensitive information", "security audit", "scan history for secrets", or…
  • 86scan
    Scan this machine's AI agents and MCP servers, a container image, an SBOM or a repository with agent-bom for CVEs, supply-chain risk and exposed credentials. Use when the user asks for an agent-bom scan, an MCP or agent security check, or an AI supply-chain audit.
  • 90agentic-security
    Use when auditing the security of an AI-coding-agent setup in a repository: Claude Code project settings and hooks, plugin manifests and hooks.json, .mcp.json and MCP servers, skills, agents and rule files, permission rules, secrets in agent configuration, and CI workflows that…
  • 86scan
    Scan this machine's AI agents and MCP servers, a container image, an SBOM or a repository with agent-bom for CVEs, supply-chain risk and exposed credentials. Use when the user asks for an agent-bom scan, an MCP or agent security check, or an AI supply-chain audit. It does not…
  • 86sordino-openai
    Use when working in a Codex project that routes OpenAI traffic through Sordino for local PII masking.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.