- Create a new branch from
main - Navigate to repos folder
- Based on the language, open
[language].txtfile - Add your repository link at the end. (do not leave any trailing/leading white-spaces or newlines)
- Raise the PR to
main
If a new file is created in the previous steps, meaning repositories for a new language have been added, follow the below additional steps.
- Navigate to Privado Core Comparison Workflow
- Create a branch from
dev - Add a new element in the array which should be exactly the name of the file added in the previous steps. (without
.txt) - Raise a PR to
devand subsequently tomain
> NOTE: For ruby, please add a new file `ruby-n` in the comparison workflow and follow steps 1-9. The reason for this is that ruby repos take too much time to scan, and this will hinder the execution time of the workflow.
- Setup
-
Navigate to the directory
-
Run
python3 -m pip install --user virtualenv -
Run
python3 -m venv env -
Run
source env/bin/activate -
Run
pip install -r requirements.txtto install all the dependencies. -
Run
python3 ./run.py -f [first_branch] -s [second_branch]
-
Options
-
To specify a custom repository list, use
-ror--repos. Default is./repos.txt. -
Run
python3 ./run.py -r path_to_file.txt -f [base_branch] -s [head_branch] -
To upload the output result to slack, use
--upload. Default is set to--no-upload -
Run
python3 ./run.py -b [base_branch] -h [head_branch] --upload -
To clear all the previously generated cache and binary data, use
-c. -
Run
python3 ./run.py -b [base_branch] -h [head_branch] -c -
To store the privado-core binary for future use, use
-b -
Run
python3 ./run.py -b [base_branch] -h [head_branch] -b True. Cache is deleted after each run by default. -
To specify privado branch when comparing privado-core branch, use
-rbband-rbh -
Run
python3 ./run.py -b [base_branch] -h [head_branch] -rbb [privado_base_branch] -rbh [privado_head_branch] -
To compare the privado branches, use
-urc -
Run
python3 ./run.py -rbb [privado_base_branch] -rbh [privado_head_branch] -urc -
To specify privado-core branch when comparing privado branches, use
-rbband-rbh -
Run
python3 ./run.py -b [base_branch] -h [head_branch] -rbb [privado_base_branch] -rbh [privado_head_branch] -urc -
To compare already genereated
privado.jsonfiles, use-m -
Run
python3 ./run.py -b [base_privado_json_path] -h [head_privado_json_path] -m -
To use docker build instead of generating binaries, use
-dor--use-docker -
Run
python3 ./run.py --use-docker -b [base_docker_tag] -h [head_docker_tag]
- temp
- privado
- privado-core
- result
- base_branch
- repo-output.txt --- Contains the scan results
- repo.json --- privado.json for the repository
- head_branch
- repo-output.txt --- Contains the scan results
- repo.json --- privado.json for the repository