https://github.com/hahwul/zap.cr
ZAP implementation for crystal
https://github.com/hahwul/zap.cr
crystal-lang zap zaproxy
Last synced: about 2 months ago
JSON representation
ZAP implementation for crystal
- Host: GitHub
- URL: https://github.com/hahwul/zap.cr
- Owner: hahwul
- License: mit
- Created: 2026-03-09T13:25:14.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-06T15:25:09.000Z (about 2 months ago)
- Last Synced: 2026-04-15T08:02:14.228Z (about 2 months ago)
- Topics: crystal-lang, zap, zaproxy
- Language: Crystal
- Homepage: https://zap.cr.hahwul.com
- Size: 162 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Agents: docs/AGENTS.md
Awesome Lists containing this project
README
# zap.cr
Crystal client library for [ZAP](https://www.zaproxy.org/) API.
## Installation
Add the dependency to your `shard.yml`:
```yaml
dependencies:
zap:
github: hahwul/zap.cr
```
Then run `shards install`.
## Usage
```crystal
require "zap"
# Initialize client
client = Zap::Client.new("http://localhost:8080", "your-api-key")
```
### API Access
```crystal
# Core
client.core.version
# Spider
client.spider.scan(url: "https://example.com")
# Active Scan
client.ascan.scan(url: "https://example.com")
# Alerts
client.alert.alerts_summary("https://example.com")
```
### Convenience Scan
```crystal
# Full scan (Spider + Ajax Spider + Active Scan)
client.scan.full("https://example.com") { |phase, progress|
puts "#{phase}: #{progress}%"
}
# Spider + Active Scan only
client.scan.spider_and_scan("https://example.com")
# Spider only
client.scan.spider("https://example.com")
```
## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## Contributors
- [hahwul](https://github.com/hahwul) - creator and maintainer