https://github.com/zapkub/credscan
Repository scanner, looking for specific keyword
https://github.com/zapkub/credscan
Last synced: 2 months ago
JSON representation
Repository scanner, looking for specific keyword
- Host: GitHub
- URL: https://github.com/zapkub/credscan
- Owner: zapkub
- Created: 2022-11-28T04:51:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-28T05:41:51.000Z (over 2 years ago)
- Last Synced: 2025-02-01T15:25:43.771Z (4 months ago)
- Language: Go
- Size: 613 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Credscan
minimal repository scanner service## Stack on this app
- Sqlite3
- Golang## How Worker works
- find queued job if exist
- Clone repository to working dir
- iterate through the files
- write the result back to database
## Todo
- [ ] single entity get API
- [ ] Containerized
- [ ] handling repository scan error
- [ ] recover failed/crash job
- [ ] Optimize worker pool
- [ ] Ability to remove Job
- [ ] better to have docker compose for quick start## How to use it
you need to run both server and worker and mount the same working dir
```
$ docker run -v $(pwd)/data:/app/data -p 3000:3000 credscan/server
$ docker run -v $(pwd)/data:/app/data -p 3000:3000 credscan/worker
```
then you can try to post some job via server```
$ curl -X "POST" "http://localhost:3000/job" \
-H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
--data-urlencode "repositoryUrl=https://github.com/guardrailsio/backend-engineer-challenge" \
--data-urlencode "repositoryName=Test Repo"
```and you can query all of the result from this API
```
$ curl "http://localhost:3000/jobs"
```