Code seeker is in-development repo for education purposes. The idea behind seeker is simply a BOT that seeks for latest new source codes pushed to random open source projects and public repositories hosted in Github, collecting code snippet for later to be analyzed.
The basic life-cyle is:
- seeker bot runs every day through Github workflow
- using Github API it searches for public repos and collects source code snippets based on a configuration
- using obfuscation mechanism seeker bot will override any sensitive data from the snippets collected
- a header is added for each snippet as references for the source repo, author and file
- purges the local snippet, collected from the previous run and push the new snippets to snippet folder
report
- by language
- monitoring specific repo
- by stars
- by period (daily, monthly, yearly)
code sample
- by file extension
- GitHub OauthAPI GITHUB_TOKEN
- Python 3
git clone [email protected]:eduardocerqueira/seeker.git
cd seeker
sh ops/scripts/set_dev_env.sh
sh ops/scripts/egg_build.sh
# from local build
python3 -m venv venv
source venv/bin/activate
pip install dist/seeker-0.0.2.tar.gz
# from local path with editable
git clone [email protected]:eduardocerqueira/seeker.git
cd seeker
pip install -e .
export GITHUB_TOKEN=**********
cd seeker
seeker --help
seeker --test
seeker
check report
# build
sh ops/scripts/docker_build.sh
# manually
docker build --build-arg SEEKER_RUN="--test" -t seeker -f Dockerfile . --network host
# run
sh ops/scripts/docker_run.sh
# manually
docker run -e GITHUB_TOKEN=$GITHUB_TOKEN -e GITHUB_USERNAME="eduardocerqueira" -e GITHUB_EMAIL="[email protected]" -it seeker /bin/bash
Feel free to send PR's and/or file issues. Please remember running black as showing below before sending your PR.
pip install pre-commit
pre-commit run --all