diff --git a/tests/scans/code_analysis/README.md b/tests/scans/code_analysis/README.md index d28b1dab4f..1ddef3d380 100644 --- a/tests/scans/code_analysis/README.md +++ b/tests/scans/code_analysis/README.md @@ -46,10 +46,10 @@ As said in the description, the test uses `Bandit` to look for possible Python f These directories, repository and branch can be passed to the test as parameters so it is possible to run the test in any directory containing Python code inside the Wazuh organization. -Apart from this parameters, there are more that can be used to customize the test functionality. Note that the test will fail if we check different directories and/or repository as we don't have known_flaws files for non-default directories. +Apart from these parameters, there are more that can be used to customize the test functionality. Note that the test will fail if we check different directories and/or repository as we don't have known_flaws files for non-default directories. - **--repo**: set the repository used. Default: `wazuh` -- **--branch**: set the repository branch. Default: `master` +- **--reference**: set the repository branch. Default: `master` - **--check_directories**: set the directories to check, this must be a string with the directory name. If more than one is indicated, they must be separated with comma. Default: `framework/,api/,wodles/`. - **--exclude_directories**: set the directories to exclude, this must be a string with the directory name. diff --git a/tests/scans/dependencies/README.md b/tests/scans/dependencies/README.md index 78d597a5f5..33db3c55c2 100644 --- a/tests/scans/dependencies/README.md +++ b/tests/scans/dependencies/README.md @@ -2,21 +2,20 @@ ## Description It's a tool used to scan for vulnerabilities in a requirements.txt file.\ -It can generate reports via console output or json file. Can be run with `pytest` and manage to handle remote files under github repositories. Requirements file can be specified with `repo`, `branch`, `requirements-path` parameters giving flexibility on file location. +It can generate reports via console output or json file. Can be run with `pytest` and manage to handle remote files under github repositories. Requirements file can be specified with `repo`, `reference`, `requirements-path` parameters giving flexibility on file location. Output file in which the report will be generated can be specified with `report-path` parameter. ## How to use - Pytest ``` Parameters: --repo: repository name. Default: 'wazuh'. - --branch: branch name of specified repository. Default: 'master'. - --commit: commit of specified repository. Default: None + --reference: branch name of specified repository. Default: 'master'. --requirements-path: requirements file path. Default: 'framework/requirements.txt'. --report-path: output file path. Default: 'dependencies/report_file.json'. ``` ### Scanning wazuh-qa requirements file: ``` -↪ ~/git/wazuh-qa/tests/scans ⊶ feature/1612-package-vuln-scanner ⨘ python3 -m pytest -vv -x --disable-warnings dependencies/ --repo wazuh-qa --branch master --requirements-path requirements.txt +↪ ~/git/wazuh-qa/tests/scans ⊶ feature/1612-package-vuln-scanner ⨘ python3 -m pytest -vv -x --disable-warnings dependencies/ --repo wazuh-qa --reference master --requirements-path requirements.txt ==================================================================================== test session starts ===================================================================================== platform linux -- Python 3.9.5, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 -- /home/kondent/pythonEnv/qa-env/bin/python3 cachedir: .pytest_cache @@ -75,7 +74,7 @@ FAILED dependencies/test_dependencies.py::test_python_dependencies_vuln_scan - A ### Scanning wazuh requirements file with a specific output path: ``` -↪ ~/git/wazuh-qa/tests/scans ⊶ feature/1612-package-vuln-scanner ⨘ python3 -m pytest -vv -x --disable-warnings dependencies/ --repo wazuh --branch master --requirements-path framework/requirements.txt --report-path ~/Desktop/report_file.json +↪ ~/git/wazuh-qa/tests/scans ⊶ feature/1612-package-vuln-scanner ⨘ python3 -m pytest -vv -x --disable-warnings dependencies/ --repo wazuh --reference master --requirements-path framework/requirements.txt --report-path ~/Desktop/report_file.json ==================================================================================== test session starts ===================================================================================== platform linux -- Python 3.9.5, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 -- /home/kondent/pythonEnv/qa-env/bin/python3 cachedir: .pytest_cache