Repository navigation
Batch: 2 fixes, one commit each - #52
Merged
Merged
Conversation
…50) cryptoscan pqc on an empty directory, or on one holding only a file the scanner does not read, such as a README.txt, printed "None found." under Post-quantum algorithms found, Hybrid constructions found and Quantum-vulnerable algorithms, and no line said that nothing was checked. cryptoscan scan on the same directory prints "Nothing was checked: no files were scanned under <target>". When the scan read no files and found nothing, the condition the scan report uses, the pqc view now prints that line, with the scan report's color, in place of the three lists. The readiness score, the QRAMM Dimension 1 levels and the footer follow as before. A scan that read a file prints the three lists. The pqc JSON output adds filesScanned, the key and count scan JSON output carries, after tool: 0 for the empty and README-only directories, 1 for a directory with one Python file, and the same 6 as scan for crypto-samples. A reporter test checks that the view of a scan with 0 files scanned prints the scan report's line once, with and without color, and none of the lists, and that a scan of 1 file keeps the lists. A command test runs pqc on an empty directory and on a README.txt-only directory in text and JSON, with a one-file directory as the control. Both fail on the previous commit. The existing empty-sections test now sets FilesScanned to 1, the case where "None found." is correct. Fixes #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request lands 2 commits in
internal/cli,pkg/reporter,pkg/scanner,docs/ci.mdandCHANGELOG.md.Included
Verified on this exact tree
go build -v ./...: exit 0go vet ./...: exit 0, no outputgofmt -l .: no outputgo test -race -p 4 -count=1 -timeout 9m -v ./...: exit 0; 8 packagesok, 1 package[no test files]; 1135--- PASSlines (349 top-level tests, 786 subtests), 0--- FAILlines, 0--- SKIPlinesTestChangelogEntries,TestRepeatedChangelogHeadings,TestChangelogReleasesHaveOneHeadingPerKind,TestChangelogSaysWhereSARIFAndCSVCarryTheCryptoJSTextinpkg/reporter), from the test run above: 4--- PASSlinesgolangci-lint run --concurrency 4 --max-same-issues=0 --max-issues-per-linter=0 ./...(golangci-lint 2.12.2): exit 1, 88 issues (errcheck: 48, staticcheck: 40); the same command onorigin/main(ed98c62): exit 1, 88 issues, with the same file, message and flagged source line for each (PRE-EXISTING)Not included
None
Closes
Fixes #50
Fixes #51
How to merge
Rebase and merge, so that each change stays its own commit on
main.