Back to skills
SKILL.md
Execution Scope Enforcement
ASecurityEnforce network destinations and resource identities at execution time to prevent scope expansion and egress violations.
- 2 stars
- 0 votes
- 0 copies
- 1 view
- Added October 15, 2026
Works with
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add sodejm/copilot-operation-plugin-for-security --skill execution-scope-enforcement --agent claude-codeAre you the author of Execution Scope Enforcement?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sodejm-execution-scope-enforcement)---
name: execution-scope-enforcement
description: Enforce network destinations and resource identities at execution time to prevent scope expansion and egress violations.
---
# Execution scope enforcement
Enforce execution-time destination and resource scope boundaries against `cops.engagement/v1` rules.
## Core Responsibilities
1. **Pre-Execution Destination Validation**:
- Intercept IP addresses, subnets, hostnames, and URLs prior to execution.
- Assert inclusion in authorized engagement CIDRs and domain names.
2. **Egress & Cloud Metadata Protection**:
- Strictly block attempts to query sensitive cloud instance metadata addresses (`169.254.169.254`, `fd00:ec2::254`).
- Block loopback destinations unless explicitly included.
3. **Anti-DNS Rebinding**:
- Resolve hostnames to IP addresses prior to dispatch and assert that all resolved endpoints reside within in-scope networks.
4. **Cloud Resource Scoping**:
- Enforce prefix and exact match boundaries on cloud ARNs, Azure resource IDs, and Kubernetes namespaces.
## Python API
```python
from cops.execution import ScopeDefinition, ScopeGuard, ScopeViolationError
# 1. Create scope definition from engagement contract
scope_def = ScopeDefinition.from_engagement_scope(engagement.scope)
# 2. Initialize ScopeGuard
guard = ScopeGuard(scope_def)
# 3. Check destination before execution
guard.check_destination("10.0.0.5") # Succeeds
guard.check_destination("169.254.169.254") # Raises ScopeViolationError
```
Files in this skill
- SKILL.md
- tests/test_skill.py
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.