-
Notifications
You must be signed in to change notification settings - Fork 0
docs(rules): point agent runbooks at the real workspace layout #1871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
| --- | ||
| globs: | ||
| - "gateway/src/policy.rs" | ||
| - "gateway/policies.cedar" | ||
| - "lib/policy/src/cedar.rs" | ||
| - "policies.cedar" | ||
| - "SECURITY.md" | ||
| - "lib/policy/**/*" | ||
| - "lib/storage/**/*" | ||
| --- | ||
|
|
||
| # Persona: SecurityAuditorAgent | ||
| # Active Scope: /gateway/src/policy.rs, /gateway/policies.cedar, /policy-templates, /skills | ||
| # Active Scope: /lib/policy/src/cedar.rs, /policies.cedar, /policy-templates, /skills | ||
| # Key Tasks: Verify SQL query parameterization, audit multi-tenant isolation, write Cedar policies. | ||
| # Loaded Skills: security_scan.md, cedar_policy_authoring.md, tdd_workflow.md, token_budget_advisor.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| --- | ||
| globs: | ||
| - "gateway/src/**/*.rs" | ||
| - "src/src/**/*.rs" | ||
| - "src/**/*.rs" | ||
|
Comment on lines
+3
to
4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| --- | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,8 @@ | ||||||||||||
| --- | ||||||||||||
| globs: | ||||||||||||
| - "gateway/src/db.rs" | ||||||||||||
| - "lib/storage/**/*" | ||||||||||||
| - "lib/storage/**/*.rs" | ||||||||||||
| - "gateway/migrations/**/*" | ||||||||||||
| - "lib/storage/migrations/**/*" | ||||||||||||
|
Comment on lines
+3
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The glob
Suggested change
|
||||||||||||
| --- | ||||||||||||
|
|
||||||||||||
| # AI Skill: SQLite Database Migration & Management (`skills/database_migration.md`) | ||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| --- | ||
| globs: | ||
| - "gateway/**/*" | ||
| - "src/**/*" | ||
| - "src/**/*" | ||
|
Comment on lines
+3
to
4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| - "lib/**/*" | ||
| - "sdk-python/**/*" | ||
|
|
@@ -10,6 +10,6 @@ globs: | |
| --- | ||
|
|
||
| # Persona: DeveloperAgent | ||
| # Active Scope: /gateway, /sdk-python, /sdk-typescript, /mcp-gateway-lite, /examples | ||
| # Active Scope: /src, /lib, /sdk-python, /sdk-typescript, /mcp-gateway-lite, /examples | ||
| # Key Tasks: Implement gateway Axum endpoints, configure SQLx queries, test @protect_tool decorator. | ||
| # Loaded Skills: database_migration.md, sdk_testing.md, tdd_workflow.md, token_budget_advisor.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| --- | ||
| globs: | ||
| - "gateway/src/**/*.rs" | ||
| - "src/src/**/*.rs" | ||
| - "src/**/*.rs" | ||
|
Comment on lines
+3
to
4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| - "lib/storage/**/*.rs" | ||
| - "lib/policy/**/*.rs" | ||
|
|
@@ -84,9 +84,9 @@ To prevent unauthorized access to local services during testing. | |
|
|
||
| ### Runbook Steps: | ||
| 1. **Localhost Binding:** Verify that the gateway's server listener config binds strictly to the loopback interface (`127.0.0.1`) for testing and local development, avoiding wildcard bindings (`0.0.0.0`). | ||
| 2. **Verification Command:** Inspect `gateway/src/config.rs` and `gateway/src/main.rs`. Search for bind targets: | ||
| 2. **Verification Command:** Inspect `src/src/main.rs`. Search for bind targets: | ||
| ```bash | ||
| grep -ri "0.0.0.0" gateway/ | ||
| grep -ri "0.0.0.0" src/ | ||
| ``` | ||
| If any matches are found outside production deployment scripts (like Helm/Docker), flag them as policy violations. | ||
|
|
||
|
|
@@ -101,7 +101,7 @@ Detect common software vulnerabilities in source code before merging. | |
| 1. **Run the Scanner:** Proactively run the security scanner (such as `cargo-clippy`, `bandit` for Python, or integrated MCP scanners) on all modified files. | ||
| 2. **Scan Command Example:** | ||
| ```bash | ||
| cargo clippy --manifest-path gateway/Cargo.toml -- -D warnings | ||
| cargo clippy --workspace --all-targets -- -D warnings | ||
| # And for python | ||
| bandit -r sdk-python/ | ||
| ``` | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,8 @@ | ||||||||||||
| --- | ||||||||||||
| globs: | ||||||||||||
| - "gateway/src/db.rs" | ||||||||||||
| - "lib/storage/**/*" | ||||||||||||
| - "lib/storage/**/*.rs" | ||||||||||||
| - "gateway/migrations/**/*" | ||||||||||||
| - "lib/storage/migrations/**/*" | ||||||||||||
|
Comment on lines
+3
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The glob
Suggested change
|
||||||||||||
| --- | ||||||||||||
|
|
||||||||||||
| # AI Skill: SQLite Database Usage & SQLx (`skills/sqlite_usage.md`) | ||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The glob
"lib/policy/**/*"recursively matches all files underlib/policy/, which includes"lib/policy/src/cedar.rs". Therefore,"lib/policy/src/cedar.rs"is redundant and can be removed.