-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feature: Add SARIF Support for URL Checker #91
base: master
Are you sure you want to change the base?
Conversation
This looks pretty neat, I like the the idea too. @vsoch what do you think? |
My quick read is that SARIF is for static analysis tools relevant for security (e.g., code scanning) and I'm not sure a broken link detected falls under that scope. The RFC linked is for this page https://www.rfc-editor.org/rfc/rfc3986 which has nothing to do with an invalid URL, it's just that it is down. There are arguably many ways you could convert this data, and I'd argue if you wanted this specific format, it would be better to be an external script or step run after extraction. @dwertent it would be helpful to walk me through the use cases for adding this. Superficially I don't think I am convinced yet. |
Hi @vsoch, Thank you for your feedback. I understand your concerns regarding the use of SARIF for reporting broken links and the relevance of the RFC link I provided. Here are some points to clarify my intention and the use case for adding SARIF:
I hope this clarifies the motivation and potential benefits of integrating SARIF for broken link reporting. I'd be happy to provide further details or discuss any other concerns you might have. |
Motivation
This PR introduces SARIF support to the
urlchecker-python
tool. SARIF is a standardized format for static analysis results, which improves integration with various tools and workflows, enabling better reporting and issue tracking in CI/CD pipelines.How to Use
The new feature allows users to save URL-checking results in SARIF format by specifying the output format during the command execution:
$ urlchecker check --save results.sarif --format sarif .
The default behavior remains unaffected, with CSV being the default output format. Users can still generate CSV reports without any changes to their current workflow.
Under the Hood
save_results_as_sarif
to theUrlChecker
class, generating SARIF logs.save_results_format
parameter to specify the desired output format (csv
orsarif
).Unit Tests
Included unit tests to verify the SARIF output functionality, ensuring the new format is correctly generated and validated.