Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tree-sitter/fuzz-action
Input fuzzing action for tree-sitter parsers
https://github.com/tree-sitter/fuzz-action
actions tree-sitter
Last synced: 3 months ago
JSON representation
Input fuzzing action for tree-sitter parsers
- Host: GitHub
- URL: https://github.com/tree-sitter/fuzz-action
- Owner: tree-sitter
- License: mit
- Created: 2024-02-24T09:48:54.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-12T11:38:31.000Z (8 months ago)
- Last Synced: 2024-09-27T10:22:15.201Z (3 months ago)
- Topics: actions, tree-sitter
- Language: Perl
- Homepage:
- Size: 24.4 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tree-sitter parser fuzzing
> [!IMPORTANT]
> This only works on Linux.## Options
```yaml
directory:
description: The directory of the grammar
corpus:
description: The directory of the seed corpus
timeout:
description: The time to wait if the fuzzer hangs
default: 10
max-time:
description: The maximum total fuzzing time
default: 60
max-length:
description: The maximum fuzz input length
default: 4096
tree-sitter-version:
description: The tree-sitter version to install
default: latest
```## Example configuration
```yaml
name: Fuzz parseron:
push:
branches: [master]
paths:
- src/scanner.c
pull_request:
paths:
- src/scanner.cjobs:
test:
name: Parser fuzzing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tree-sitter/fuzz-action@v4
```## Using locally
### Requirements
- `pkg-config`
- `make`
- `jq`
- `llvm`
- `tree-sitter` library### Usage
```bash
make LANG_NAME=parser LANG_DIR=/path/to/tree-sitter-parser
```> [!TIP]
> Check the [Makefile](./Makefile) for more options.## Credits
Based on [vigoux/tree-sitter-fuzz-action](https://github.com/vigoux/tree-sitter-fuzz-action)