Back to skill

Security audit

Write Better Tests

Security checks for vulnerabilities and agentic risk

Overview

This skill is a testing-quality guide that asks the agent to write stronger regression tests and does not contain hidden execution, persistence, exfiltration, or privilege-seeking behavior.

Install this if you want Codex to be stricter about tests and to prefer behavior-focused regression proof. Expect it to push for focused test runs and, when practical, temporary local red-green checks that should be cleaned up before final changes.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger description is extremely broad, applying to nearly any testing-related activity in any repository. That can cause the skill to be invoked in many ordinary contexts, increasing the chance of unnecessary instruction injection, overreach into unrelated work, or accidental interference with repository-specific testing practices.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 6)May include surrounding context.

md
description: Use when Codex is adding, editing, selecting, reviewing, or explaining tests in any repository, including mocks, fixtures, snapshots, CI validation, regression coverage, TDD/red-green proof, or readiness claims. Enforces behavior-first test design so tests catch real regressions instead of merely passing the current implementation.
---

# Write Better Tests

Use this skill whenever test quality matters. The goal is not "more tests"; the goal is tests a skeptical maintainer would trust.