[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75ST6597Q8VX6S5MMX5JVC7":3,"skill-same:01M75ST6597Q8VX6S5MMX5JVC7":102},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M75ST6597Q8VX6S5MMX5JVC7","cwe1321-protection-suite",null,"ZyntroAI\u002Ffastapi-python-boilerplate","ZyntroAI","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F312382677?v=4","01M75SQSYX5NMYH6AGGAS67D2B","Zyntro​ Media","01M75SQSZHW30DBXDX3TAYJ92F",1,"MIT","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"# Security Module: CWE-1321 — Prototype Pollution Protection\n\n**ID:** `cwe1321-protection-suite-v1.0.0`  **Version:** 1.0.0  **Type:** Security Module\n**Tags:** cwe-1321, prototype-pollution, security, semgrep, bandit, eslint, codeql, sanitizer\n**Severity:** P0 (Critical)  **Visibility:** Public · Production Ready\n\n## Overview\n\nDetection rules (ESLint \u002F Semgrep \u002F CodeQL \u002F Bandit) plus runtime sanitization\nhelpers (JS + Python) that together eliminate **CWE-1321 Prototype Pollution**\nfrom the NotebookLM Skill Suite and any FastAPI\u002FJS code paths that ingest\nuntrusted JSON.\n\n## Files (in `deliverables\u002Fcwe1321-protection-suite\u002F`)\n\n```\njs\u002Fsanitize.js          runtime helpers (sanitizePrototypeKeys, safeMerge, safeClone, nullObject)\njs\u002Feslint-rules.json    no-proto \u002F no-prototype-builtins \u002F detect-object-injection\njs\u002Fsemgrep-cwe1321-js.yml\njs\u002Fcodeql-query.ql\npython\u002Fsafe_parser.py   safe_load_json \u002F safe_update_dict \u002F fastapi_safe_dict\npython\u002Fbandit.config\npython\u002Fsemgrep-cwe1321-py.yml\ntests\u002F                  8 JS tests (node --test) + 9 Python tests (pytest)\n```\n\n## Threat model (CWE-1321)\n\nUntrusted input carrying `__proto__`, `prototype`, or `constructor` keys can,\nwhen merged\u002Fassigned onto an object or mapped onto attributes by a framework\n(Pydantic coercion, ORM `**kwargs`, `setattr`), mutate shared prototype \u002F class\nstate. This often escalates to RCE or auth bypass.\n\n## Protection gates\n\n| Layer      | Engine   | What it enforces |\n|------------|----------|------------------|\n| Static JS  | ESLint   | `no-proto`, `no-prototype-builtins`, `security\u002Fdetect-object-injection` |\n| Static JS  | Semgrep  | `__proto__`\u002F`prototype`\u002F`constructor` writes, naive merge |\n| Data-flow  | CodeQL   | writes to `__proto__`\u002F`prototype`\u002F`constructor` |\n| Static Py  | Semgrep  | setattr \u002F dict \u002F merge pollution patterns |\n| Static Py  | Bandit   | severity baseline (medium+) |\n| Runtime    | JS\u002FPython helpers | strip blocked keys at every depth, safe merge, safe loaders |\n\n## Verification gates (Gate 5 of skill template)\n\n1. **Structure valid** — YAML\u002FJSON rules parse; helpers are dependency-free.\n2. **Vuln scan** — Semgrep + Bandit flag the target patterns in real payloads.\n3. **Permission check** — safe loaders never write outside the target object.\n4. **Output verify** — report shape is the suite standard `{status, keys, remediation}`.\n\n## Skill wiring\n\n- `notebooklm-link-resolver` → run query params through `sanitizePrototypeKeys`.\n- `artifact-router` → sanitize paths \u002F IDs via `safe_parser.strip_blocked_keys`.\n- `link-to-knowledge` → accept only payloads that pass `fastapi_safe_dict`.\n- `link-security` → remediation hook (safe loaders).\n\n## Import\n\nPlace under `skills\u002F` (registry) or keep in `deliverables\u002Fcwe1321-protection-suite\u002F` as the source\nof truth. Both copies are kept in sync. Register in `skills\u002Findex.json` with\n`provides: [\"cwe-1321-protection\", \"prototype-pollution-detection\", \"prototype-pollution-sanitization\"]`.\n",{},"main","c68ea5db21e36ef3f01986f87cf40276e64c2e9b","deliverables\u002Fcwe1321-protection-suite",0,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate","https:\u002F\u002Fzyntroai.github.io\u002Ffastapi-python-boilerplate\u002F","https:\u002F\u002Fgithub.com\u002FZyntroAI","2026-11-02 02:14:54",{"source":7,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add ZyntroAI\u002Ffastapi-python-boilerplate --skill cwe1321-protection-suite",{"tool":36,"command":37},"bunx","bunx skills add ZyntroAI\u002Ffastapi-python-boilerplate --skill cwe1321-protection-suite",{"tool":39,"command":40},"pnpm","pnpm dlx skills add ZyntroAI\u002Ffastapi-python-boilerplate --skill cwe1321-protection-suite","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002FSKILL.md",true,[44,50,56,60,66,70,74,78,82,86,90,94,98],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"HANDOFF.md","REFERENCE","参考文档",585,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002FHANDOFF.md",{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"js\u002Fcodeql-query.ql","OTHER","其他",1378,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Fjs\u002Fcodeql-query.ql",{"path":57,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":58,"sourceHtmlUrl":59},"js\u002Feslint-rules.json",709,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Fjs\u002Feslint-rules.json",{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"js\u002Fsanitize.js","SCRIPT","脚本",3515,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Fjs\u002Fsanitize.js",{"path":67,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":68,"sourceHtmlUrl":69},"js\u002Fsemgrep-cwe1321-js.yml",2764,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Fjs\u002Fsemgrep-cwe1321-js.yml",{"path":71,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":72,"sourceHtmlUrl":73},"manifest.json",992,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Fmanifest.json",{"path":75,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":76,"sourceHtmlUrl":77},"python\u002Fbandit.config",540,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Fpython\u002Fbandit.config",{"path":79,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":80,"sourceHtmlUrl":81},"python\u002Fsafe_parser.py",3517,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Fpython\u002Fsafe_parser.py",{"path":83,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":84,"sourceHtmlUrl":85},"python\u002Fsemgrep-cwe1321-py.yml",2229,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Fpython\u002Fsemgrep-cwe1321-py.yml",{"path":87,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":88,"sourceHtmlUrl":89},"README.md",3975,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002FREADME.md",{"path":91,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":92,"sourceHtmlUrl":93},"TEST-REPORT.md",2162,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002FTEST-REPORT.md",{"path":95,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":96,"sourceHtmlUrl":97},"tests\u002Fsanitize.test.mjs",2996,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Ftests\u002Fsanitize.test.mjs",{"path":99,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":100,"sourceHtmlUrl":101},"tests\u002Ftest_safe_parser.py",2646,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fdeliverables\u002Fcwe1321-protection-suite\u002Ftests\u002Ftest_safe_parser.py",[103,109,116,122,128,134],{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":18},"01M75SVXD72XFZWSX20BSWW622","workflow_dispatch","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow_dispatch\u002FSkill.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":18},"01M75SVVF3FBTNHKFWAF8H6ZD2","research","Multi-source research & knowledge synthesis with cross-validation, provenance graph, confidence score","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":18},"01M75SVR5BQFH3MM78FWR8V10V","pr-triage-automove","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fpr-triage-automove\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":18},"01M75SVPAMK09RRZ56SPVRPJ2K","patch","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fpatch\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":18},"01M75SVKCB0EMDSY2Q76BGNNH5","git-patch-merge","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fgit-patch-merge\u002FSKILL.md",[],[],{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":18},"01M75SVH67JHCKQ632D6HE5ZHZ","fetching","Low-level async HTTP\u002FGraphQL fetch — SSRF-safe, retry, cache, provenance","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Ffetching\u002FSKILL.md",[],[]]