Skip to content
Cisco AI Defense logo
CiscoAI Security

Scan Policies — Skill Scanner

Scan Policies

Scan policies define scanner behavior without code changes. Start with a built-in preset, then override only what your organization needs.


Which Preset Should I Use?

Scanning...Use
Untrusted or external skillsstrict — maximum sensitivity
Normal CI/CD pipelinebalanced (default) — good detection-to-noise ratio
Trusted internal skillspermissive — reduced noise

Built-In Presets

PresetPostureTypical Use
strictMaximum sensitivityUntrusted content, compliance audits, security reviews
balancedDefault blendGeneral CI usage, day-to-day development scanning
permissiveLower noiseTrusted internal workflows, known-safe skill directories
skill-scanner scan ./my-skill --policy strict
skill-scanner scan ./my-skill --policy balanced
skill-scanner scan ./my-skill --policy permissive

Generate and Customize a Policy

# Generate a policy YAML from a preset
skill-scanner generate-policy --preset balanced -o my_policy.yaml

# Interactive TUI for editing every policy section
skill-scanner configure-policy -i my_policy.yaml -o my_policy.yaml

# Use the custom policy
skill-scanner scan ./my-skill --policy my_policy.yaml

Merge Behavior

Custom policy files merge over defaults:

  • Missing keys inherit defaults from the base preset
  • Scalar fields override directly
  • Lists replace defaults entirely (they do not append)

Policy Sections

Policies cover 14 sections controlling everything from file classification to LLM context budgets.

High-Impact Sections

SectionWhat It Controls
pipelineCommand-chain demotion, known installer handling, trusted domains, exfil hint words
rule_scopingWhich rules fire on which file types; docs vs code path gating
file_limitsMaximum file count, individual file size, nesting depth
analysis_thresholdsAnalyzability risk levels, unicode steganography sensitivity
severity_overridesPer-rule severity remapping (promote or demote)
disabled_rulesSuppress specific rule IDs entirely

All Sections

SectionPurpose
analyzersEnable/disable core analyzers (static, bytecode, pipeline)
file_limitsSize, count, and depth constraints
file_classificationBinary tier mappings and hidden file allowlists
analysis_thresholdsAnalyzability scoring and unicode detection thresholds
rule_scopingRule-to-filetype mapping and doc-path exclusions
pipelineShell pipeline analysis tuning
command_safetyCommand risk tier classification
severity_overridesPer-rule severity adjustments
disabled_rulesRule suppression list
finding_outputDeduplication and co-occurrence annotation settings
metadataPolicy fingerprint and metadata attachment
enrichmentLLM enrichment context budget
docs_scanningDocumentation path scanning behavior
hidden_filesHidden file handling allowlists

Common Policy Tweaks

Suppress a Noisy Rule

disabled_rules:
  - HIDDEN_FILE_DETECTED
  - BINARY_FILE_DETECTED

Promote a Rule to CRITICAL

severity_overrides:
  DATA_EXFIL_HTTP_POST: CRITICAL
  HARDCODED_SECRET_GENERIC: HIGH

Restrict File Size Limits

file_limits:
  max_files: 50
  max_file_size_bytes: 1048576
  max_nesting_depth: 2

Adjust Analyzability Thresholds

analysis_thresholds:
  analyzability_low_risk: 90
  analyzability_medium_risk: 70

Using Policies in the SDK

from skill_scanner import SkillScanner
from skill_scanner.core.scan_policy import ScanPolicy

# Use a built-in preset
policy = ScanPolicy.from_preset("strict")

# Or load a custom YAML file
policy = ScanPolicy.from_yaml("my_policy.yaml")

scanner = SkillScanner(policy=policy)
result = scanner.scan_skill("/path/to/skill")

Policy in CI/CD

Commit your custom policy to the repository and reference it in CI:

skill-scanner scan-all ./skills --policy .github/scan-policy.yaml --fail-on-severity high

Or in GitHub Actions:

with:
  skill_path: .cursor/skills
  policy: .github/scan-policy.yaml

Full Reference

For exhaustive knob-by-knob documentation of every policy field, see: