{"id":49889344,"url":"https://github.com/santhsecurity/codewalk","last_synced_at":"2026-05-15T20:09:21.400Z","repository":{"id":346917675,"uuid":"1192195018","full_name":"santhsecurity/codewalk","owner":"santhsecurity","description":"Fast security-aware file tree walker — gitignore, binary detection, memmap2, parallel","archived":false,"fork":false,"pushed_at":"2026-03-26T12:57:27.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-26T22:36:11.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santhsecurity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-26T01:28:27.000Z","updated_at":"2026-03-26T12:57:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/santhsecurity/codewalk","commit_stats":null,"previous_names":["santhsecurity/codewalk"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/santhsecurity/codewalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fcodewalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fcodewalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fcodewalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fcodewalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santhsecurity","download_url":"https://codeload.github.com/santhsecurity/codewalk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fcodewalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33078195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:05:40.333Z","status":"ssl_error","status_checked_at":"2026-05-15T20:05:38.672Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-15T20:09:20.628Z","updated_at":"2026-05-15T20:09:21.394Z","avatar_url":"https://github.com/santhsecurity.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codewalk\n\nWalk a directory tree. Skip binaries, respect .gitignore, memory-map large files. Parallel mode for scanning big codebases.\n\n```rust\nuse codewalk::{CodeWalker, WalkConfig};\n\nlet walker = CodeWalker::new(\"/path/to/repo\", WalkConfig::default());\nfor entry in walker.walk() {\n    println!(\"{} ({} bytes)\", entry.path.display(), entry.size);\n    let content = entry.content_str().unwrap();\n    // scan the content\n}\n```\n\n## What the defaults do\n\nOut of the box, codewalk skips:\n- Binary files (detected by magic bytes, not just extension)\n- Hidden files and directories\n- Common junk directories: node_modules, .git, target, __pycache__, vendor, .venv, Pods\n- Files over 10MB\n\nIt respects .gitignore rules automatically.\n\n## Why not walkdir or ignore?\n\n`walkdir` gives you paths. `ignore` gives you paths respecting gitignore. Neither reads file content, detects binary files by magic bytes, or memory-maps large files. If you're building a security scanner or code analyzer, you need all three: walk, skip binaries, read content efficiently. codewalk does that in one call. Without it you're stacking walkdir + a binary detector + a gitignore parser + an mmap wrapper + size limits. codewalk is that stack, tested and ready.\n\n## Configuration\n\nOverride any default via struct fields or TOML:\n\n```toml\nmax_file_size = 1048576\nskip_binary = true\nskip_hidden = false\nrespect_gitignore = true\nfollow_symlinks = false\ninclude_extensions = [\"rs\", \"py\", \"js\"]\nexclude_dirs = [\"node_modules\", \".git\"]\n```\n\n```rust\nlet config = WalkConfig::from_toml(r#\"\n    include_extensions = [\"rs\", \"py\"]\n    max_file_size = 5242880\n\"#).unwrap();\n```\n\n## Parallel walking\n\nFor large codebases, walk on multiple threads:\n\n```rust\nlet rx = walker.walk_parallel(4);\nfor entry in rx {\n    // entries arrive as they're discovered\n}\n```\n\n## Memory-mapped reading\n\nFiles above 64KB (configurable) are memory-mapped instead of read into a Vec. Below that threshold, regular read is faster.\n\n```rust\nlet content = entry.content().unwrap();\nlet bytes: \u0026[u8] = content.as_bytes();\n```\n\n## Binary detection\n\nChecks file extension first (fast), then magic bytes if needed. Recognizes ELF, PE, Mach-O, WASM, ZIP, images, audio, databases, and more.\n\n## Contributing\n\nPull requests are welcome. There is no such thing as a perfect crate. If you find a bug, a better API, or just a rough edge, open a PR. We review quickly.\n\n## License\n\nMIT. Copyright 2026 CORUM COLLECTIVE LLC.\n\n[![crates.io](https://img.shields.io/crates/v/codewalk.svg)](https://crates.io/crates/codewalk)\n[![docs.rs](https://docs.rs/codewalk/badge.svg)](https://docs.rs/codewalk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanthsecurity%2Fcodewalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanthsecurity%2Fcodewalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanthsecurity%2Fcodewalk/lists"}