{"id":13515576,"url":"https://github.com/d0c-s4vage/gramfuzz","last_synced_at":"2025-09-11T09:34:04.877Z","repository":{"id":57435742,"uuid":"76222948","full_name":"d0c-s4vage/gramfuzz","owner":"d0c-s4vage","description":"gramfuzz is a grammar-based fuzzer that lets one define complex grammars to generate text and binary data formats.","archived":false,"fork":false,"pushed_at":"2020-10-02T08:04:16.000Z","size":6492,"stargazers_count":257,"open_issues_count":9,"forks_count":40,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-07-12T03:50:08.748Z","etag":null,"topics":["complex-grammars","fuzzer","fuzzing","grammar","parsing"],"latest_commit_sha":null,"homepage":"https://d0c-s4vage.github.io/gramfuzz/","language":"Python","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/d0c-s4vage.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-12T04:51:52.000Z","updated_at":"2025-05-26T16:46:12.000Z","dependencies_parsed_at":"2022-09-01T18:41:14.819Z","dependency_job_id":null,"html_url":"https://github.com/d0c-s4vage/gramfuzz","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/d0c-s4vage/gramfuzz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d0c-s4vage%2Fgramfuzz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d0c-s4vage%2Fgramfuzz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d0c-s4vage%2Fgramfuzz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d0c-s4vage%2Fgramfuzz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d0c-s4vage","download_url":"https://codeload.github.com/d0c-s4vage/gramfuzz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d0c-s4vage%2Fgramfuzz/sbom","scorecard":{"id":315449,"data":{"date":"2025-08-11","repo":{"name":"github.com/d0c-s4vage/gramfuzz","commit":"1fc088255339b44fb23ad969a8c8ca1d0e7549d6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T00:05:58.235Z","repository_id":57435742,"created_at":"2025-08-18T00:05:58.236Z","updated_at":"2025-08-18T00:05:58.236Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274609465,"owners_count":25316621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["complex-grammars","fuzzer","fuzzing","grammar","parsing"],"created_at":"2024-08-01T05:01:13.041Z","updated_at":"2025-09-11T09:34:04.838Z","avatar_url":"https://github.com/d0c-s4vage.png","language":"Python","funding_links":[],"categories":["Fuzzing","Tools","Python"],"sub_categories":["Misc"],"readme":"# gramfuzz\n\n[![Master Build Status](https://travis-ci.org/d0c-s4vage/gramfuzz.svg?branch=master)](https://travis-ci.org/d0c-s4vage/gramfuzz)\n[![PyPI Statistics](https://img.shields.io/pypi/dm/gramfuzz)](https://pypistats.org/packages/gramfuzz)\n[![Latest Release](https://img.shields.io/pypi/v/gramfuzz)](https://pypi.python.org/pypi/gramfuzz/)\n\n`gramfuzz` is a grammar-based fuzzer that lets one define\ncomplex grammars to model text and binary data formats.\n\n- [Contributing](#contributing)\n- [Installation](#installation)\n- [Documentation](#documentation)\n- [TLDR Example](#tldr-example)\n- [More Examples](#more-examples)\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for details. PRs welcome!\n\n## Installation\n\nInstall via pip:\n\n```\npip install gramfuzz\n```\n\n## Documentation\n\nFor detailed documentation, please [view the full docs here](https://d0c-s4vage.github.io/gramfuzz/)\n\n## TLDR Example\n\n\nSuppose we define a grammar for generating names and their prefixes\nand suffixes:\n\n```python\n# names_grammar.py\nimport gramfuzz\nfrom gramfuzz.fields import *\n\nclass NRef(Ref):\n    cat = \"name_def\"\nclass NDef(Def):\n    cat = \"name_def\"\n\n\nDef(\"name\",\n    Opt(NRef(\"name_title\")),\n    NRef(\"personal_part\"),\n    NRef(\"last_name\"),\n    Opt(NRef(\"name_suffix\")),\ncat=\"name\", sep=\" \")\nNDef(\"personal_part\",\n    NRef(\"initial\") | NRef(\"first_name\"), Opt(NRef(\"personal_part\")),\nsep=\" \")\nNDef(\"last_name\", Or(\n    \"Blart\", \"Tralb\"\n))\nNDef(\"name_suffix\",\n    Opt(NRef(\"seniority\")),\n    Or(\"Phd.\", \"CISSP\", \"MD.\", \"MBA\", \"NBA\", \"NFL\", \"WTF\", \"The Great\"),\nsep=\" \")\nNDef(\"seniority\", Or(\"Sr.\", \"Jr.\"))\nNDef(\"name_title\", Or(\n    \"Sir\", \"Ms.\", \"Mr.\", \"Mrs.\", \"Senator\", \"Capt.\", \"Maj.\", \"Lt.\", \"President\"\n))\nNDef(\"first_name\", Or(\"Henry\", \"Susy\"))\nNDef(\"initial\",\n    String(min=1, max=2, charset=String.charset_alpha_upper), \".\"\n)\n```\n\nWe could then use this grammar like so:\n\n```python\nimport gramfuzz\n\nfuzzer = gramfuzz.GramFuzzer()\nfuzzer.load_grammar(\"names_grammar.py\")\nnames = fuzzer.gen(cat=\"name\", num=10)\nprint(\"\\n\".join(names))\n```\n\nWhich would output something like this:\n\n```\nMs. Susy Henry Tralb\nLt. Henry Henry Tralb\nL. Tralb WTF\nMaj. L. W. N. Tralb\nZ. Tralb\nSenator C. K. Henry Blart\nHenry Tralb CISSP\nLt. Henry Tralb Jr. NBA\nMaj. Susy Tralb Sr. NBA\nHenry C. Blart WTF\n```\n\n## More Examples\n\nSee the examples (and example script) in the examples folder:\n\n```\n lptp [ tmp ]: git clone https://github.com/d0c-s4vage/gramfuzz\n lptp [ tmp ]: cd gramfuzz/examples\n lptp [ examples ]: ./example.py --help\nusage: gramfuzz/examples/example.py [-h] -g GRAMMAR [-n N] [-s RAND_SEED]\n                                    [--max-recursion R] [-o OUTPUT]\n\nThis script will generate N instances of the specified grammar.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -g GRAMMAR, --grammar GRAMMAR\n                        The grammar to load. One of: names,python27,roman_numeral,postal\n  -n N, --number N      The number of times to generate top-level nodes from the specified grammar(s) (default=1)\n  -s RAND_SEED, --seed RAND_SEED\n                        The random seed to initialize the PRNG with (default=None)\n  --max-recursion R     The maximum reference recursion depth allowed (default=10)\n  -o OUTPUT, --output OUTPUT\n                        The output file to output the generated data to (default=stdout)\n lptp [ examples ]: ./example.py -g postal -n 10 -s 1337 --max-recursion 5\nZ. Tralb\n69 Baker Street 8325U \nMalang, IL 64666-4973\nSenator Susy Henry Blart WTF\n56 Sesame Street \nYokohama, WV 49471-3667\nHenry I. Tralb Jr. CISSP\n63 Spooner Street 858H \nTehran, TX 27259-9556\nCapt. Henry Susy Blart Jr. Phd.\n65536 Jump Street \nMalang, ID 84108-0969\nSusy Blart\n0 Rainey Street \nWuhan, FL 16712-1095\nP. Blart NFL\n98 Wisteria Lane \nShenyang, NH 70126\nHenry Henry Blart Phd.\n30 Rainey Street \nMadras, GA 90915\nSenator Henry E. Tralb\n38 Spooner Street \nTianjin, CT 37211\nMaj. Henry Tralb\n70 Rainey Street 458W \nHongKong, OK 40689\nMrs. Henry Blart\n11 Sesame Street \nBeijing, MT 58689-7258\n```\n\n## Contributors\n\n* @docfate111\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd0c-s4vage%2Fgramfuzz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd0c-s4vage%2Fgramfuzz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd0c-s4vage%2Fgramfuzz/lists"}