Open nluzgin opened 1 month ago
gosec - securego/gosec:2.21.2 конвертор - https://github.com/Swordfish-Security/hub-tool-converters/commit/c58f09386482dd1eee87dc57890644b076b03182
Запуск скана gosec: gosec \ -fmt=${REPORT_FORMAT} \ -no-fail \ -out=${REPORT_FILE} \ ./...
gosec \ -fmt=${REPORT_FORMAT} \ -no-fail \ -out=${REPORT_FILE} \ ./...
Запуск конвертации: python main.py \ --type ${CONVERT_TYPE} \ --scanner ${SCAN_TOOL} \ --format ${SCAN_FORMAT} \ --filename ${REPORT_FILE} \ --output ${CONVERTED_REPORT_FILE} \ --name ${CI_PROJECT_NAME} \ --url ${CI_PROJECT_URL} \ --branch ${CI_COMMIT_BRANCH} \ --commit ${CI_COMMIT_SHA} \ --build-tool "${APPSECHUB_BUILD_TOOL}"
python main.py \ --type ${CONVERT_TYPE} \ --scanner ${SCAN_TOOL} \ --format ${SCAN_FORMAT} \ --filename ${REPORT_FILE} \ --output ${CONVERTED_REPORT_FILE} \ --name ${CI_PROJECT_NAME} \ --url ${CI_PROJECT_URL} \ --branch ${CI_COMMIT_BRANCH} \ --commit ${CI_COMMIT_SHA} \ --build-tool "${APPSECHUB_BUILD_TOOL}"
SCAN_TOOL - gosec SCAN_FORMAT - sarif
Возникает exception: Traceback (most recent call last): File "/scripts/main.py", line 106, in <module> results = parser.get_findings(f, '') File "/scripts/converters/parsers/sarif.py", line 34, in get_findings items.extend(self.__get_items_from_run(run)) File "/scripts/converters/parsers/sarif.py", line 45, in __get_items_from_run item = get_item(result, rules, artifacts, run_date) File "/scripts/converters/parsers/sarif.py", line 414, in get_item finding.mitigation = "\n".join( TypeError: sequence item 0: expected str instance, NoneType found
Traceback (most recent call last): File "/scripts/main.py", line 106, in <module> results = parser.get_findings(f, '') File "/scripts/converters/parsers/sarif.py", line 34, in get_findings items.extend(self.__get_items_from_run(run)) File "/scripts/converters/parsers/sarif.py", line 45, in __get_items_from_run item = get_item(result, rules, artifacts, run_date) File "/scripts/converters/parsers/sarif.py", line 414, in get_item finding.mitigation = "\n".join( TypeError: sequence item 0: expected str instance, NoneType found
UPD: Json прожевал, сариф - нет
gosec_scan_results.sarif.txt
gosec - securego/gosec:2.21.2 конвертор - https://github.com/Swordfish-Security/hub-tool-converters/commit/c58f09386482dd1eee87dc57890644b076b03182
тут мог быть пример файла, но у меня DLP
Запуск скана gosec:
gosec \ -fmt=${REPORT_FORMAT} \ -no-fail \ -out=${REPORT_FILE} \ ./...
Запуск конвертации:
python main.py \ --type ${CONVERT_TYPE} \ --scanner ${SCAN_TOOL} \ --format ${SCAN_FORMAT} \ --filename ${REPORT_FILE} \ --output ${CONVERTED_REPORT_FILE} \ --name ${CI_PROJECT_NAME} \ --url ${CI_PROJECT_URL} \ --branch ${CI_COMMIT_BRANCH} \ --commit ${CI_COMMIT_SHA} \ --build-tool "${APPSECHUB_BUILD_TOOL}"
SCAN_TOOL - gosec SCAN_FORMAT - sarif
Возникает exception:
Traceback (most recent call last): File "/scripts/main.py", line 106, in <module> results = parser.get_findings(f, '') File "/scripts/converters/parsers/sarif.py", line 34, in get_findings items.extend(self.__get_items_from_run(run)) File "/scripts/converters/parsers/sarif.py", line 45, in __get_items_from_run item = get_item(result, rules, artifacts, run_date) File "/scripts/converters/parsers/sarif.py", line 414, in get_item finding.mitigation = "\n".join( TypeError: sequence item 0: expected str instance, NoneType found