Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gosec][sarif]: Ошибки конвертации - необработанное исключение при парсинге отчёта #27

Open
nluzgin opened this issue Sep 18, 2024 · 2 comments

Comments

@nluzgin
Copy link

nluzgin commented Sep 18, 2024

gosec - securego/gosec:2.21.2
конвертор - c58f093

тут мог быть пример файла, но у меня 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

@nluzgin
Copy link
Author

nluzgin commented Sep 18, 2024

UPD: Json прожевал, сариф - нет

@WDN2010
Copy link

WDN2010 commented Sep 18, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants