T01 · Skill Instruction Hijacking
- Location
src/task-injection.js:120- Finding
Default-On Injection of Broad, Environment-Specific Agent Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its resilience purpose, but it can send credentials and task contents to loosely controlled API destinations and inject default workflow-changing instructions into spawned agents.
Review this before installing. Use it only with a trusted Paperclip endpoint, prefer HTTPS with a known host, avoid putting secrets in task text, and disable or customize task-injection defaults unless you want its PR and blocker-routing workflow imposed on spawned agents. Do not schedule run recovery with broad credentials until endpoint handling is constrained.
src/task-injection.js:120Default-On Injection of Broad, Environment-Specific Agent Instructions
src/lib/paperclip-issue-gate.js:39Bearer Token and Task Content Sent to an Unrestricted API URL
src/run-recovery.js:319Run Recovery Can Forward Paperclip Credentials over HTTP or to an Arbitrary Host
src/task-injection.js:215Predictable Shared Temporary File Permits Task Disclosure and Symlink Overwrite
If only spawn-with-fallback is implemented while the skill advertises model rotation, run recovery, blocker routing, and task injection, users may over-trust the package and deploy it expecting safeguards that do not exist. In resilience tooling, missing promised protections can directly increase operational risk by leaving failures, stuck agents, or escalation paths unhandled.
If only spawn-with-fallback is implemented while the skill advertises model rotation, run recovery, blocker routing, and task injection, users may over-trust the package and deploy it expecting safeguards that do not exist. In resilience tooling, missing promised protections can directly increase operational risk by leaving failures, stuck agents, or escalation paths unhandled.
If only spawn-with-fallback is implemented while the skill advertises model rotation, run recovery, blocker routing, and task injection, users may over-trust the package and deploy it expecting safeguards that do not exist. In resilience tooling, missing promised protections can directly increase operational risk by leaving failures, stuck agents, or escalation paths unhandled.
If only spawn-with-fallback is implemented while the skill advertises model rotation, run recovery, blocker routing, and task injection, users may over-trust the package and deploy it expecting safeguards that do not exist. In resilience tooling, missing promised protections can directly increase operational risk by leaving failures, stuck agents, or escalation paths unhandled.
If only spawn-with-fallback is implemented while the skill advertises model rotation, run recovery, blocker routing, and task injection, users may over-trust the package and deploy it expecting safeguards that do not exist. In resilience tooling, missing promised protections can directly increase operational risk by leaving failures, stuck agents, or escalation paths unhandled.
If only spawn-with-fallback is implemented while the skill advertises model rotation, run recovery, blocker routing, and task injection, users may over-trust the package and deploy it expecting safeguards that do not exist. In resilience tooling, missing promised protections can directly increase operational risk by leaving failures, stuck agents, or escalation paths unhandled.
Referenced artifact was not completely inspected
| **Run Recovery** | `src/run-recovery.js` | Detects failed Paperclip heartbeat runs (gateway errors, timeouts, 429s) and re-invokes agents with model fallback.
Referenced artifact was not completely inspected
| **Task Injection** | `src/task-injection.js` | Enriches spawn task descriptions with issue tracking metadata, PR requirements, and UX design checklists before
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
openai-codex/gpt-5.3-codex": "anthropic/claude-sonnet-4-6" }, "failurePatterns": { "patterns": ["rate[\s_-]?limit", "402", "credits", "quota"] }, "failureStopReasons": { "reasons": ["error", "credits_exhausted", "quota_exceeded"] } }
Generate a config interactively:
```bash
node scripts/setup.js
For automated run recovery, add this to your system crontab or OpenClaw cron:
# system crontab
*/15 * * * * node /path/to/skills/paperclip-resilience/src/run-recovery.js
# openclaw cron (run: openclaw cron add ...)
# see SKILL.md §4 for details
All user-controlled inputs (model names, task file paths, spawn modes, labels) are validated before use. See SECURITY-AUDIT-REPORT.md for the full audit record.
Key boundaries:
execFile only, no exec)Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
const dir = path.dirname(outPath);
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
// Safety check: don't overwrite without warning if file exists
if (fs.existsSync(outPath)) {
console.log(`\n⚠ ${outPath} already exists — overwriting.`);
}
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
const statePath = options.statePath || rotationConfig.statePath;
const state = loadState(statePath);
const key = prKey(repo, pr);
delete state.prs[key];
saveState(state, statePath);
const result = { reset: true, pr: key };
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
console.log('\n── Quick Security Validation ──');
try {
testModule.validateFilePath('../../../etc/passwd');
console.log(' ❌ FAIL: Path traversal should be blocked');
} catch (err) {
if (err.message.includes('Path traversal')) {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
console.log('\n── Quick Security Validation ──');
try {
testModule.validateFilePath('../../../etc/passwd');
console.log(' ❌ FAIL: Path traversal should be blocked');
} catch (err) {
if (err.message.includes('Path traversal')) {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
console.log('\n── Quick Security Validation ──');
try {
testModule.validateFilePath('../../../etc/passwd');
console.log(' ❌ FAIL: Path traversal should be blocked');
} catch (err) {
if (err.message.includes('Path traversal')) {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
console.log('\n── Quick Security Validation ──');
try {
testModule.validateFilePath('../../../etc/passwd');
console.log(' ❌ FAIL: Path traversal should be blocked');
} catch (err) {
if (err.message.includes('Path traversal')) {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
console.log('\n── Quick Security Validation ──');
try {
testModule.validateFilePath('../../../etc/passwd');
console.log(' ❌ FAIL: Path traversal should be blocked');
} catch (err) {
if (err.message.includes('Path traversal')) {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
console.log('\n── Quick Security Validation ──');
try {
testModule.validateFilePath('../../../etc/passwd');
console.log(' ❌ FAIL: Path traversal should be blocked');
} catch (err) {
if (err.message.includes('Path traversal')) {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
console.log('\n── Quick Security Validation ──');
try {
testModule.validateFilePath('../../../etc/passwd');
console.log(' ❌ FAIL: Path traversal should be blocked');
} catch (err) {
if (err.message.includes('Path traversal')) {
The skill declares network- and environment-dependent behavior but does not expose any explicit tool scope or permissions metadata. In an agent marketplace or orchestrated runtime, this weakens operator visibility and policy enforcement, increasing the chance that a skill with outbound access or secret consumption is installed under broader trust than intended.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
Options:
--output <path> Path to write config.json (default: ./config.json)
--no-input Skip prompts and emit defaults only
--dry-run Print the generated config but do not write it
-h, --help Show this help
`);
The wrapper automatically retries a failed request against a different model provider, which can forward the same task contents to another third party without explicit user consent at decision time. If tasks contain proprietary data, credentials, regulated data, or customer content, this creates a cross-provider data disclosure and policy/compliance risk even though the code is otherwise trying to improve resilience.