analyzing-security-headers
Warn
Audited by Gen Agent Trust Hub on Oct 28, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONPRIVILEGE_ESCALATIONMETADATA_POISONINGINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The script
scripts/generate_report.pycontains agenerate_scriptmethod that dynamically assembles shell scripts (.sh) from a template and a content string provided at runtime. This allows for the creation of executable logic based on agent-provided data. - [PRIVILEGE_ESCALATION]: The
generate_report.pyscript explicitly usesfile_path.chmod(0o755)to grant executable permissions to any script it generates. Dynamically granting execution rights to files created at runtime is a dangerous pattern that can be leveraged for arbitrary code execution. - [METADATA_POISONING]: There is a deceptive mismatch between the skill's documentation and its code. The
SKILL.mdandscripts/README.mdclaimscripts/analyze_headers.pyperforms security header analysis usingrequestsandbeautifulsoup4. However, the actual Python code is a generic file system analyzer that calculates directory sizes and identifies large files, containing no logic for HTTP header analysis. - [INDIRECT_PROMPT_INJECTION]: The skill processes external data (URLs and domains) and produces remediation configurations. If the agent is instructed to use the script-generation capability of
generate_report.pyto save these configurations, a path is created for untrusted data to be written into executable files. - Ingestion points: Target domains and URLs provided by the user in
SKILL.md. - Boundary markers: None present; the script generator does not use delimiters or validation for the
contentparameter. - Capability inventory: File system write access and execution permission modification via
scripts/generate_report.py. - Sanitization: No sanitization or shell-escaping is performed on the content before it is written to the shell script template.
Audit Metadata