Skip to content
Back to skills

Execution Scope Enforcement

ASecurity

Enforce 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
securitypythonkubernetesazureapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 15, 2026

npx -y skills add sodejm/copilot-operation-plugin-for-security --skill execution-scope-enforcement --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Execution Scope Enforcement?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Execution Scope Enforcement
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sodejm-execution-scope-enforcement/badge)](https://www.skillsdirectory.com/skills/sodejm-execution-scope-enforcement)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.md1.5 KB
  • tests/test_skill.py1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.