diff --git a/.tekton/on-pull-request.yaml b/.tekton/on-pull-request.yaml index 6315138b..2c9c9b44 100644 --- a/.tekton/on-pull-request.yaml +++ b/.tekton/on-pull-request.yaml @@ -469,6 +469,54 @@ spec: echo "--- INTEGRATION TESTS FINISHED SUCCESSFULLY ---" + finally: + - name: post-integration-evaluation + when: + - input: $(tasks.integration-test.status) + operator: in + values: + - Succeeded + - Failed + params: + - name: INTEGRATION_TEST_STATUS + value: $(tasks.integration-test.status) + taskSpec: + params: + - name: INTEGRATION_TEST_STATUS + type: string + steps: + - name: report + image: registry.access.redhat.com/ubi9/python-312:9.6 + workingDir: $(workspaces.source.path) + env: + - name: EXPLOIT_IQ_API_BASE + valueFrom: + configMapKeyRef: + name: evaluation-config + key: EXPLOIT_IQ_API_BASE + - name: EXPLOIT_IQ_API_TOKEN + valueFrom: + secretKeyRef: + name: evaluation-secret + key: EXPLOIT_IQ_API_TOKEN + - name: NGC_API_KEY + valueFrom: + secretKeyRef: + name: evaluation-secret + key: NGC_API_KEY + script: | + #!/bin/bash + set -e + echo "--- POST INTEGRATION REPORT ---" + echo "Integration test status: $(params.INTEGRATION_TEST_STATUS)" + #check if the run_cve_evaluation.py file is present + if [ -f run_cve_evaluation.py ]; then + echo "run_cve_evaluation.py file found" + python3 run_cve_evaluation.py --mode api --stages all --submit + else + echo "run_cve_evaluation.py file not found" + fi + echo "--- POST INTEGRATION REPORT DONE ---" workspaces: - name: source diff --git a/src/vuln_analysis/tools/lexical_full_search.py b/src/vuln_analysis/tools/lexical_full_search.py index 7166b5e5..abc46a12 100644 --- a/src/vuln_analysis/tools/lexical_full_search.py +++ b/src/vuln_analysis/tools/lexical_full_search.py @@ -27,7 +27,7 @@ logger = LoggingFactory.get_agent_logger(__name__) - +#add documentation for the tool class LexicalSearchToolConfig(FunctionBaseConfig, name=LEXICAL_CODE_SEARCH): """ Lexical search tool used to search source code.