Back to skill

Security audit

Sovereign Project Guardian

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward project health auditor; it reads repository files to report security and quality gaps, with no hidden persistence, exfiltration, or privilege escalation behavior found.

Install only if you want an agent to inspect the target repository for security and quality issues. Review any suggested npm or npx remediation commands before running them, preferably pin versions and use lock files, and avoid invoking the skill on repositories containing secrets you do not want surfaced in the chat.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (1)

T08 · Insecure Dependencies

Warning
Location
EXAMPLES.md:140
Finding
Unversioned Third-Party Package Installation Creates Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Locations**: `EXAMPLES.md:140`, `EXAMPLES.md:160`, `EXAMPLES.md:185`, `EXAMPLES.md:221`, `EXAMPLES.md:349-350`, and `EXAMPLES.md:356-357` **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash npm install --save-exact express pg jsonwebtoken ``` ```bash npm install --save-exact helmet cors express-rate-limit ``` ```bash npm install --save-dev --save-exact jest supertest ``` ```bash npm install --save-dev --save-exact eslint prettier eslint-config-prettier ``` ```bash npm install --save-dev --save-exact typescript @types/node @types/express npx tsc --init --strict ``` ```bash npm install --save-dev --save-exact husky lint-staged npx husky init ``` ### Technical Analysis The documented commands install packages without explicit reviewed versions. The `--save-exact` option only records the version selected during that installation; it does not constrain which version npm initially resolves and downloads. Consequently, following the instructions at different times can install different package releases. During installation, npm may also execute lifecycle scripts supplied by direct or transitive dependencies. This can occur before the newly generated lock file provides reproducibility. The `npx` commands may additionally download and execute a package when a suitable local executable is unavailable, although the preceding installation normally supplies the expected package. This behavior creates a supply-chain exposure if a named package, one of its transitive dependencies, or the relevant registry distribution channel is compromised. No evidence indicates that any package named in the examples is currently malicious; the vulnerability is the unsafe dependency acquisition practice. ### Attack Path 1. A threat actor compromises a referenced package, a transitive dependency, a maintainer account, or the package publication channel. 2. The attacker pu ...[truncated 1523 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Specify reviewed immutable versions in every installation command, for example: ```bash npm install --save-exact express@<reviewed-version> pg@<reviewed-version> jsonwebtoken@<reviewed-version> ``` 2. Generate and commit `package-lock.json` only after reviewing the resolved dependency tree and package integrity metadata. 3. For repeatable installation, use the committed lock file: ```bash npm ci ``` 4. In CI, use a clean, isolated runner with least-privilege credentials and restrict unnecessary network and filesystem access. 5. Audit direct and transitive dependencies using appropriate vulnerability and provenance checks before adoption. 6. Review packages for lifecycle scripts. Where operationally compatible, consider disabling scripts during initial inspection: ```bash npm ci --ignore-scripts ``` Required lifecycle scripts should then be reviewed and run explicitly. 7. Execute only locally installed command-line tools. Replace unrestricted `npx` usage with a local package script or: ```bash npx --no-install tsc --init --strict npx --no-install husky init ``` 8. Configure an approved registry, retain npm integrity verification, and consider package allowlisting or lock-file integrity enforcement in CI. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (12)

Credential Access

High
Category
Privilege Escalation
Content
- [FAIL] S1: Secrets found in source code
  - `src/db.js:3` contains database password: "dbpass123"
  - `src/routes/users.js:1` contains JWT secret: "mysecret"
- [FAIL] S2: No .gitignore -- .env files would be committed
- [FAIL] S3: package.json uses wildcard versions ("express": "*")
  - No package-lock.json found
- [FAIL] S4: No security middleware (no helmet, no CORS config, no rate limiting)
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
- [FAIL] S1: Secrets found in source code
  - `src/db.js:3` contains database password: "dbpass123"
  - `src/routes/users.js:1` contains JWT secret: "mysecret"
- [FAIL] S2: No .gitignore -- .env files would be committed
- [FAIL] S3: package.json uses wildcard versions ("express": "*")
  - No package-lock.json found
- [FAIL] S4: No security middleware (no helmet, no CORS config, no rate limiting)
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
- [FAIL] S1: Secrets found in source code
  - `src/db.js:3` contains database password: "dbpass123"
  - `src/routes/users.js:1` contains JWT secret: "mysecret"
- [FAIL] S2: No .gitignore -- .env files would be committed
- [FAIL] S3: package.json uses wildcard versions ("express": "*")
  - No package-lock.json found
- [FAIL] S4: No security middleware (no helmet, no CORS config, no rate limiting)
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
- [FAIL] S1: Secrets found in source code
  - `src/db.js:3` contains database password: "dbpass123"
  - `src/routes/users.js:1` contains JWT secret: "mysecret"
- [FAIL] S2: No .gitignore -- .env files would be committed
- [FAIL] S3: package.json uses wildcard versions ("express": "*")
  - No package-lock.json found
- [FAIL] S4: No security middleware (no helmet, no CORS config, no rate limiting)
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
- [FAIL] S1: Secrets found in source code
  - `src/db.js:3` contains database password: "dbpass123"
  - `src/routes/users.js:1` contains JWT secret: "mysecret"
- [FAIL] S2: No .gitignore -- .env files would be committed
- [FAIL] S3: package.json uses wildcard versions ("express": "*")
  - No package-lock.json found
- [FAIL] S4: No security middleware (no helmet, no CORS config, no rate limiting)
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
Copy `.env.example` to `.env` and fill in values:

    cp .env.example .env

## Usage
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
**Files that must be gitignored:**
- `.env`, `.env.local`, `.env.production`, `.env.staging`, `.env.development`
- `*.pem`, `*.key`, `*.p12`
- `credentials.json`, `service-account*.json`

**Result:**
- PASS: All sensitive file patterns are in `.gitignore`
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Ae1

High
Category
analysis-evasion
Content
| `SKILL.md` | This file -- complete evaluation methodology |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Unsafe Defaults

Medium
Category
Tool Misuse
Content
```
DATABASE_URL=postgres://user:password@localhost:5432/myapp
JWT_SECRET=change-me-to-a-random-64-char-string
NODE_ENV=development
PORT=3000
```
Confidence
60% confidence
Finding
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The README advertises very broad trigger phrases such as asking for a project's health score or what to fix first, which can easily overlap with normal conversation in unrelated contexts. This increases the chance the skill is invoked unintentionally, causing unexpected repository inspection, noisy outputs, or interference with other higher-priority tasks an agent is performing.

Static analysis

No suspicious patterns detected.