[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78FEA7H27JBARXFPWBCN0VD":3,"skill-same:01M78FEA7H27JBARXFPWBCN0VD":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M78FEA7H27JBARXFPWBCN0VD","filesystem-security",null,"Path traversal defense, symlink attack mitigation, TOCTOU prevention, POSIX permissions, atomic file replacement, and protected directories","poppyTM\u002Foride","poppyTM","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F339400917?v=4","01M78F6YNKFR5S5JQR27X9F09Z","Poppy Team","01M78F6YP8ZZTRES9X8Q2ZAD21",1,"MIT","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ffilesystem-security\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: filesystem-security\ndescription: Path traversal defense, symlink attack mitigation, TOCTOU prevention, POSIX permissions, atomic file replacement, and protected directories\n---\n# Filesystem Security & Access Control\n\n## 1. Path Traversal Defense\nNormalize and sanitize all file paths using canonical library methods (e.g. filepath.Clean). Verify that the resolved target path is strictly prefixed by the authorized workspace root before performing any read, write, or delete operation.\n\n## 2. Symlink & Hardlink Attack Prevention\nResolve all symbolic links to their absolute target paths using filepath.EvalSymlinks. Explicitly reject any symlink whose target destination lies outside the designated project root directory.\n\n## 3. Time-of-Check to Time-of-Use (TOCTOU) Mitigation\nAvoid vulnerable check-then-open sequences. Use atomic file descriptor operations (e.g. os.OpenFile with O_CREATE|O_EXCL) to guarantee that the file examined is the exact file modified without race window exploitation.\n\n## 4. Strict POSIX Permission Discipline\nEnforce restrictive file permissions: 0600 (read\u002Fwrite by owner only) for private files and credentials; 0700 for private directories; 0644 for public source files; 0755 for executables. Never create world-writable files (0666\u002F0777).\n\n## 5. Safe Temporary File Management\nCreate temporary files exclusively via secure system utilities (os.CreateTemp) within designated temporary directories. Set restrictive permissions on temporary files and guarantee cleanup using defer os.Remove.\n\n## 6. Atomic File Replacement\nNever overwrite production files directly in-place. Write new content to an adjacent temporary file in the same filesystem directory, call f.Sync() to flush buffers to disk, and execute an atomic rename (os.Rename).\n\n## 7. File Size & Memory Caps\nGuard file reads against memory exhaustion attacks using bounded readers (io.LimitReader). Enforce an explicit maximum file size threshold (e.g. max 50MB) for automated ingestion and tool parsing.\n\n## 8. Protected Directory Shield\nHardcode inviolable security barriers that prevent modifications to critical infrastructure paths: .git\u002F, .prumo\u002Fcredentials, system binary directories, and root filesystem locations.\n\n## 9. Secure Data Wiping\nWhen deleting temporary files containing decrypted keys or sensitive tokens, overwrite the disk blocks with random bytes or zeros prior to unlinking to prevent data recovery from raw block storage.\n\n## 10. Filesystem Audit Logging\nRecord all file creation, modification, and deletion events in the project security audit log, capturing relative path, actor ID, timestamp, and post-modification cryptographic checksum.\n","# Filesystem Security & Access Control\n\n## 1. Path Traversal Defense\nNormalize and sanitize all file paths using canonical library methods (e.g. filepath.Clean). Verify that the resolved target path is strictly prefixed by the authorized workspace root before performing any read, write, or delete operation.\n\n## 2. Symlink & Hardlink Attack Prevention\nResolve all symbolic links to their absolute target paths using filepath.EvalSymlinks. Explicitly reject any symlink whose target destination lies outside the designated project root directory.\n\n## 3. Time-of-Check to Time-of-Use (TOCTOU) Mitigation\nAvoid vulnerable check-then-open sequences. Use atomic file descriptor operations (e.g. os.OpenFile with O_CREATE|O_EXCL) to guarantee that the file examined is the exact file modified without race window exploitation.\n\n## 4. Strict POSIX Permission Discipline\nEnforce restrictive file permissions: 0600 (read\u002Fwrite by owner only) for private files and credentials; 0700 for private directories; 0644 for public source files; 0755 for executables. Never create world-writable files (0666\u002F0777).\n\n## 5. Safe Temporary File Management\nCreate temporary files exclusively via secure system utilities (os.CreateTemp) within designated temporary directories. Set restrictive permissions on temporary files and guarantee cleanup using defer os.Remove.\n\n## 6. Atomic File Replacement\nNever overwrite production files directly in-place. Write new content to an adjacent temporary file in the same filesystem directory, call f.Sync() to flush buffers to disk, and execute an atomic rename (os.Rename).\n\n## 7. File Size & Memory Caps\nGuard file reads against memory exhaustion attacks using bounded readers (io.LimitReader). Enforce an explicit maximum file size threshold (e.g. max 50MB) for automated ingestion and tool parsing.\n\n## 8. Protected Directory Shield\nHardcode inviolable security barriers that prevent modifications to critical infrastructure paths: .git\u002F, .prumo\u002Fcredentials, system binary directories, and root filesystem locations.\n\n## 9. Secure Data Wiping\nWhen deleting temporary files containing decrypted keys or sensitive tokens, overwrite the disk blocks with random bytes or zeros prior to unlinking to prevent data recovery from raw block storage.\n\n## 10. Filesystem Audit Logging\nRecord all file creation, modification, and deletion events in the project security audit log, capturing relative path, actor ID, timestamp, and post-modification cryptographic checksum.\n",{"name":5,"description":7},"main","1cd515630b8ceb57777d466bee4970fe7c2e30e0",".ai\u002Fskills\u002Ffilesystem-security",0,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride","https:\u002F\u002Fgithub.com\u002FpoppyTM","https:\u002F\u002Fpoppy.lat","Construímos linguagens de programação e ferramentas para quem lê código com o mesmo cuidado com que escreve.","2026-09-30 10:15:52",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add poppyTM\u002Foride --skill filesystem-security",{"tool":39,"command":40},"bunx","bunx skills add poppyTM\u002Foride --skill filesystem-security",{"tool":42,"command":43},"pnpm","pnpm dlx skills add poppyTM\u002Foride --skill filesystem-security","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ffilesystem-security\u002FSKILL.md",true,[47,53,57,61,65,71,75],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"checks\u002Ffilesystem-security-checklist.md","REFERENCE","参考文档",620,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ffilesystem-security\u002Fchecks\u002Ffilesystem-security-checklist.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"examples\u002Fsafe_file_upload.md",1973,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ffilesystem-security\u002Fexamples\u002Fsafe_file_upload.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"manifest.json",1986,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ffilesystem-security\u002Fmanifest.json",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Ffile-upload-security.md",1860,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ffilesystem-security\u002Freferences\u002Ffile-upload-security.md",{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"scripts\u002Fcheck_permissions.sh","SCRIPT","脚本",62,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ffilesystem-security\u002Fscripts\u002Fcheck_permissions.sh",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fverify.sh",3766,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ffilesystem-security\u002Fscripts\u002Fverify.sh",{"path":76,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":77,"sourceHtmlUrl":78},"templates\u002Ffilesystem-security-report.md",1331,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ffilesystem-security\u002Ftemplates\u002Ffilesystem-security-report.md",[80,86,92,99,106,113],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M78FHQN254KEH0DETXT5JM29","zoom-reflow","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fzoom-reflow\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M78FHP1880S695V8GQEE0RXK","wireframe-styleguide","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fwireframe-styleguide\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M78FHHYM6AN2H819FABW01DZ","visual-regression","Pixel-by-pixel snapshot testing, Playwright integration, dynamic content masking, deterministic font rendering, and cross-browser CI gates","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fvisual-regression\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M78FHE53D8DD0QVRY5C37DA4","ui-implementation","Component-driven UI implementation, multi-state matrix (default, hover, focus-visible, active, disabled, loading, empty, error), DTCG design tokens, responsive layout contracts, and accessibility tree mapping.","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fui-implementation\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M78FHBJ1KXFF734GFE509TBJ","tui-editor-engine","Text buffer and editing semantics for a terminal code editor — index conversion, transaction-first editing, multi-cursor invariants, undo grouping, and large-file behaviour.","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftui-editor-engine\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M78FH9X6CPJX1H61ZDWTTVW8","tree-sitter-context-indexing","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftree-sitter-context-indexing\u002FSKILL.md",[],[]]