CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
59 lines
5.1 KiB
JSON
59 lines
5.1 KiB
JSON
{
|
|
"skill_name": "security-review",
|
|
"evals": [
|
|
{
|
|
"id": 1,
|
|
"prompt": "Security review this new file-download endpoint (Node/Express). Authenticated users should only download files from their own folder under `/data/uploads/<userId>/`.\n\n```js\napp.get('/download', requireAuth, (req, res) => {\n const file = req.query.name;\n const p = path.join('/data/uploads', req.user.id, file);\n res.sendFile(p);\n});\n```",
|
|
"expected_output": "Should map the trust boundary (query parameter from an authenticated user) and the resource (filesystem). Should identify path traversal: name=../<otherUserId>/secret.pdf or ../../../etc/passwd escapes the user folder since path.join normalizes '..'. Should build a plausible attack path (attacker capability: any authenticated user; input; missing control: no containment check; impact: read other users' files or server files). Should state severity, preconditions, impact, and a practical fix (resolve the path and verify it stays within the user's base directory, or use sendFile's root option), failing closed. Should separate confirmed vulnerability from defense-in-depth suggestions.",
|
|
"assertions": [
|
|
"Identifies path traversal via the name query parameter",
|
|
"Gives a concrete attack input such as ../ sequences reaching another user's folder or system files",
|
|
"States the precondition that the attacker only needs to be authenticated",
|
|
"States severity and impact",
|
|
"Proposes a fix that resolves the path and verifies it stays inside the user's directory, or uses an equivalent root option",
|
|
"The fix fails closed by rejecting paths outside the allowed directory",
|
|
"Separates the confirmed vulnerability from defense-in-depth suggestions"
|
|
],
|
|
"files": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"prompt": "Can you check this config change for security issues?\n\n```yaml\n# docker-compose.prod.yml\nservices:\n api:\n environment:\n - DB_PASSWORD=Pr0d-S3cret!\n - CORS_ORIGINS=*\n - ASPNETCORE_ENVIRONMENT=Development\n ports:\n - \"0.0.0.0:5432:5432\"\n```\nThis file is committed to the repo.",
|
|
"expected_output": "Should report evidence-backed findings: hardcoded production database password committed to the repository (secret exposure; requires rotation); database port exposed on all interfaces; ASPNETCORE_ENVIRONMENT=Development in production (likely detailed error pages leaking internals); CORS wildcard (impact depends on credential use; may be defense-in-depth unless credentials allowed). Each with severity, preconditions, impact, and practical fix. Should recommend rotating the leaked secret, not just removing it.",
|
|
"assertions": [
|
|
"Flags the committed production DB password as secret exposure",
|
|
"Recommends rotating the exposed password in addition to removing it from the file",
|
|
"Flags exposing port 5432 on all interfaces",
|
|
"Flags running with ASPNETCORE_ENVIRONMENT=Development in production",
|
|
"Discusses the CORS wildcard and qualifies its impact or classifies it appropriately",
|
|
"States severity and preconditions for each finding"
|
|
],
|
|
"files": []
|
|
},
|
|
{
|
|
"id": 3,
|
|
"prompt": "Security review this helper. Be thorough, list every possible vulnerability.\n\n```python\nALLOWED_SORT = {'name', 'created_at'}\n\ndef list_projects(conn, user_id: int, sort: str):\n if sort not in ALLOWED_SORT:\n raise ValueError('invalid sort')\n return conn.execute(\n f\"SELECT id, name FROM projects WHERE owner_id = %s ORDER BY {sort}\",\n (user_id,),\n ).fetchall()\n```\n`user_id` comes from the authenticated session, not from the request.",
|
|
"expected_output": "Despite the request to list every possible vulnerability, should report only evidence-backed findings. The interpolated sort is validated against an allowlist, user_id is parameterized and comes from the session, and results are scoped by owner. Should conclude there is no confirmed vulnerability and not invent attack scenarios. May list defense-in-depth notes separately and clearly labeled.",
|
|
"assertions": [
|
|
"Recognizes that sort is validated against an allowlist before interpolation",
|
|
"Recognizes that user_id is parameterized and sourced from the session",
|
|
"States that no confirmed vulnerability was found",
|
|
"Does not report SQL injection as a confirmed vulnerability",
|
|
"Labels any remaining suggestions as defense-in-depth rather than vulnerabilities"
|
|
],
|
|
"files": []
|
|
},
|
|
{
|
|
"id": 4,
|
|
"prompt": "Security review this.\n\n```diff\n # src/app/theme.scss\n-$primary: #1565c0;\n+$primary: #0d47a1;\n```",
|
|
"expected_output": "The diff only changes a style color. No trust boundary, input handling, auth, secret, or sensitive data is involved. Should state there is no security scope and report no security findings, without inventing attack scenarios.",
|
|
"assertions": [
|
|
"States that the diff crosses no trust boundary",
|
|
"Reports no security findings",
|
|
"Does not invent attack scenarios"
|
|
],
|
|
"files": []
|
|
}
|
|
]
|
|
}
|