Repository navigation
fix(tier1): report dependency advisories as structured findings - #421
Conversation
The dependency audit recorded pip-audit and Safety advisories only as legacy "[CVE-HIGH] ..." error strings. A vulnerable pin failed the run, but the advisory never reached result.findings: JSON findings and severity counts left it out, SARIF had no result, and a policy overlay could not change its severity. Safety JSON with a null or object severity, a non-text advisory or a top-level list raised AttributeError, and so did a pip-audit advisory with a null severity, which the report validator accepts. Advisories are now DEPENDENCY findings whose check name is the advisory ID (SAFETY-<id> for numeric Safety IDs), at the requirements file and the physical line that pins the package, or at pyproject.toml. The metadata binds the scanned version to the declared exact pin (name==version as the target spells it and its line or declaration position, never the raw line) and records the advisory source, affected range (Safety), fixed versions, aliases, and a runtime/dev/test/docs/build role from whole tokens of the requirements file stem or optional group. Requirement warnings now name the physical line when --hash continuation lines come first. Kept from main: the pinned-only audit with --no-deps --disable-pip, the report validation, exit-code and inventory checks, incomplete semantics, fail_on_medium for pip-audit and Safety's non-blocking medium findings. A caller that passes no declarations, such as the private plugin audit, still gets the tagged CVE message it converts into its own findings. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follow-up to the structured dependency advisories. - A critical advisory no longer stops a folder run at the first skill. The dependency audit runs its folder loop with continue-on-failure, so later skills are still audited, and a policy that accepts one advisory can no longer pass a run whose other skills were never audited. - Safety's severity object, printed with an API key, now sets the severity: the CVSS v3 level, then the v3 score, then the v2 score and level, and medium only without any of them. A JSON-number vulnerability_id names the finding SAFETY-<id> instead of Unknown. - A Safety advisory that pip-audit already reported for the same package version under its ID or CVE is left out. A Safety advisory that matches no audited pin has resolution_status "unbound". - Requirements files are audited in sorted order. Line numbers advance only at \n, \r\n and \r, so a form feed or U+2028 no longer shifts them. - The role words add devel, devtools, lint, linting, pytest, unittest and testutils. - The CLI prints warnings that no finding repeats next to the findings, the Markdown report lists them for an incomplete result without an independent error, and apply_policy keeps them when it rebuilds a result, so the reason an audit is INCOMPLETE stays visible. - The CHANGELOG names TypeError for a non-text Safety advisory and drops a non-list vulnerabilities field, which main already ignored. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The requirements joiner continued any line that ended in a backslash, a comment line included. In "idna==3.10", "# pinned for py2 \", "pyyaml==5.3" the pyyaml pin became part of the comment, so pip-audit saw only idna and the check passed, although pip install -r installs pyyaml 5.3. main joined the same way. A line that starts with "#" after optional whitespace now ends the declaration, as pip's join_lines does with COMMENT_RE, so the next pin is audited at its own line. A pin whose trailing comment ends in a backslash still continues, as in pip. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ults Advisories are findings now, so apply_policy can rebuild a dependency result through recalculate_from_findings, which treated only HIGH and CRITICAL findings as errors. With DependencySecurityValidator( fail_on_medium=True), a medium pip-audit advisory failed the run until a policy changed another advisory's severity; the rebuild then turned the medium advisory, which the policy never named, into a warning and passed the run. Each pip-audit finding of such a validator now records fail_on_medium in its metadata, and recalculate_from_findings applies it to a MEDIUM finding. Safety advisories do not carry it and stay warnings, as before. Only the Python API sets the option; the CLI does not. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
… failed The dependency docs said every advisory appears in JSON findings, the severity counts and SARIF. In a folder run, a skill whose audit passes is summarized as one passed check, so its medium or low advisories are not listed; the docs now say so and how to see them. The CHANGELOG said a non-text Safety advisory stopped the check with an AttributeError or TypeError. On 0.8.0 a number or null advisory raised TypeError, an object raised KeyError (slices are hashable on Python 3.12 and later), and a list did not fail. The entry now names those cases, and the malformed-output test covers an object advisory. The test of the declaration-free legacy path now describes its caller without naming a feature. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
A Safety severity object such as {"cvssv3": {"base_score": 10**400}}
made math.isfinite raise OverflowError, which escaped the dependency
check and the Tier 1 loop. The 0 to 10 range check alone rejects NaN,
infinity and huge integers, so drop the isfinite call; such a score is
skipped like any other out-of-range score.
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Markdown report now lists warnings that no finding repeats for every incomplete result, including results with findings. Those warnings can name target files, such as a requirements file whose name contains markup, but they were written raw while the error list and the findings table escape the same text. Escape them with html.escape as the error list does. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
apply_policy imported skillevaluator.reporting.base inside the function to keep the warnings that no finding mirrors. That made validators depend on the reporting package, and the first severity change loaded every report writer. Move the matching of mirrored legacy lines into ValidationResult.independent_errors() and independent_warnings(). The reporting helpers additional_errors and additional_warnings now delegate to them, and apply_policy calls the model directly. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ries validate on a folder of skills runs each skill as its own job, so every skill's report lists its advisories. Only a dependency check that covers several skills, as with --type rules or --type workflows on a folder or the Python API, summarizes a passing skill as one passed check. In those runs a policy override cannot raise the hidden advisory either. Also say that a Safety CVSS score outside 0 to 10 is skipped. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The comment above the Tier 1 check steps said the policy normalizes "CVE findings". Dependency advisories now reach the policy as DEPENDENCY.<advisory-id> findings, and no finding has category CVE, so the comment now names DEPENDENCY.* advisory findings. A test runs the dependency check through run_validation and emit_reports: a DEPENDENCY.* override lowers the advisory and the reports pass; a CVE.* override changes nothing. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: - CHANGELOG.md: main and this branch both appended an entry at the end of Unreleased > Fixed. Kept both: main's `tier3 compare` lift entry first, then this branch's `dependency` advisory finding entry, under the single existing Fixed heading. Released sections are unchanged. docs/tier1-validation.mdx, src/skillevaluator/reporting/cli.py and src/skillevaluator/reporting/markdown.py merged without conflict; main's hunks there touch other lines than this branch's. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed structured dependency findings, declared-pin provenance, Safety advisory deduplication, severity-policy rebuilding and prefixed result/report handling, including callers and the PR test coverage. No additional actionable findings.
Validation on a clean merge candidate with current main (ce52a098), using the repository lockfile: 91 passed in 51.64s. The exact PR head 32bf36c532dc has all 10 required CI checks successful and merges without conflicts. The remote head is unchanged by this review.
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Resolved the new CHANGELOG conflict after external main merges, preserving both the dependency-advisory and landed Tier3 verdict entries. Signed-off integration commit 6c64d4d20d2e contains main a0b65a91; it also merges cleanly with latest main 487910ef1dc4. Verification:91 dependency-advisory tests passed, full source/test lint passed, Fern reported0 errors with the existing authenticated-redirect warning, and git diff --check passed. CI for the updated head is running.
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Resolved the new CHANGELOG conflict while integrating current main b38b71be01f7. All main entries and the complete dependency-advisory entry are preserved; the PR entry follows a distinct existing bullet under Unreleased / Fixed to avoid a shared insertion point during concurrent merges. The only manual conflict file is CHANGELOG.md; all production and test paths exactly match the automatic Git merge.
Verification: 91 dependency-advisory tests passed in 31.51s; ruff check . passed; pinned Fern validation reported 0 errors and the existing authenticated-redirect warning; staged whitespace checks passed. The candidate also merges cleanly with latest checked main b38b71be01f7. Current head 276881f9c602 is pushed normally with sign-off; its hosted CI is pending. No PR merge was performed by this task.
rng1995
left a comment
There was a problem hiding this comment.
Diagnosed the earlier Python 3.13 CI failure in the existing RAGAS judge deadline path. The failing test and verifier implementation are byte-identical across the failed head, main b38b71b, and this clean main-a72 merge. A controlled setup delay reproduced the same empty-cancellation assertion and unawaited ascore warning on both PR and main: Python creates the scoring coroutine before evaluating a remaining-time argument that can raise after setup exhausts the budget. The client still closes exactly once and the judge fails closed. I am preparing a minimal ordering repair and deterministic setup-expiry/active-scorer tests, preserving deadline enforcement and strict cancellation coverage.
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Added the independently reviewed repair for the pre-existing CI deadline failure. The verifier now validates remaining budget before creating the RAGAS scorer coroutine, so setup expiry cannot leave an unawaited coroutine. A deterministic setup-expiry regression failed before the fix on Python 3.12 and current-lock 3.13; it now verifies fail-closed error/None, no scorer/fallback request, no unawaited warning, and exactly-once client cleanup. The separate active-scorer case still requires actual cancellation and no longer spends its 10ms test budget on setup. Validation: all 3 deadline cases pass with RuntimeWarnings as errors; 141 broader judge/evidence tests pass under the activated locked Python 3.13 / Harbor 0.25 environment; Ruff and format checks pass. The normal signed-off push preserved external head 68ee2e8 and merged cleanly with latest main 8850662. Current-head CI is running.
Brings in #410, #412, #413, #419, #421, #425, #430 and #444. Conflicts: CHANGELOG.md (kept both Unreleased Fixed entries) and evaluation/options.py (kept main's tolerate_baseline_timeouts field and this PR's backend field). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Summary
The
dependencycheck recorded each pip-audit and Safety advisory only as an error string such as[CVE-HIGH] pyyaml==5.3: PYSEC-2020-176 -> upgrade to 5.4. The run failed, but the advisory never reachedresult.findings. Advisories are now structuredDEPENDENCYfindings bound to the pin that declared the vulnerable version.src/skillevaluator/validators/dependencies.py:Finding(category="DEPENDENCY")whose check name is the advisory ID. A numeric Safety ID, given as text or as a JSON number, becomesSAFETY-<id>. The message is unchanged (pyyaml==5.3: PYSEC-2020-176 -> upgrade to 5.4), so the legacy error string now reads[DEPENDENCY-HIGH] ... in requirements.txt:2.file_pathis the requirements file orpyproject.toml.line_numberis the line of the requirements pin.pyproject.tomlfindings have no line; their metadata names the declaration (optional group docs, declaration 2).package_name,resolved_version,declared_constraint,declaration,resolution_status,dependency_role,dependency_relationship,advisory_id,advisory_source(pip-auditorSafety),affected_range(Safety only, elsenull),fixed_versionsandaliases(strings only). A pip-audit finding of a validator built withfail_on_medium=Truealso hasfail_on_medium: true.resolution_status: resolvedanddependency_relationship: direct. Safety reads the raw requirements file, so it can report a version that no audited pin declares, such as a pin skipped for its platform marker. That advisory isunbound, withdeclared_constraint,declarationanddependency_relationshipset tonulland no line.DependencyDeclarationper accepted==pin, keyed by PEP 503 name and version. It holds the name and version as the target spelled them (Pillow_SIMD==9.0), never the raw line with its markers, options or URL credentials. A pin repeated in an optional group keeps its runtime declaration.dependency_roleisruntime,dev,test,docsorbuild, from whole words of the requirements file stem or the optional group name, split at-,_and..dev,devel,develop,development,devtools,lintandlintingmeandev;test,tests,testing,testutils,pytestandunittestmeantest;doc,docsanddocumentationmeandocs;buildmeansbuild.base_severity, then the v3base_scorethroughcvss_to_severity, then the v2 score and level. A score counts only if it is a number from 0 to 10, so a string, bool, NaN, infinity or an integer too large for a float is skipped; the range check alone rejects them, so an integer such as10**400cannot raiseOverflowError. Only an advisory with none of these ismedium. So{"cvssv3": {"base_severity": "CRITICAL", "base_score": 9.8}}is a critical finding that fails the run.main, a null or objectseverity, a top-level JSON list or a JSON string stopped the check withAttributeError, a number or nulladvisorywithTypeError, and an objectadvisorywithKeyError(slices are hashable on Python 3.12 and later). These now complete. A listadvisorydid not fail, but its Python repr went into the message; it is now left out. A non-listvulnerabilitieswas already ignored and still is."severity": null, which_validated_pip_audit_reportaccepts, no longer raisesAttributeErrorin_get_vuln_severity; it falls back to the aliases and ID prefix.ValidatorBase._validate_folder_or_skillstops a folder at the first CRITICAL finding, which is meant for configuration errors. A critical advisory concerns one skill's pins, sovalidatenow runs the folder loop withcontinue_on_failure_scope(True).requirements*.txtfiles are audited in sorted order, so findings and SARIF results keep one order on every filesystem.mainused the line index after joining--hashcontinuations, so a pin after a pip-compile block was off by the number of hash lines. Line numbers now advance only at\n,\r\nand\r, so a form feed,\x85or\u2028does not shift them.join_lines, which never continues a line that matches itsCOMMENT_RE. Onmain,idna==3.10,# pinned for py2 \,pyyaml==5.3joined the pyyaml pin into the comment, so pip-audit saw onlyidnaand the check passed, althoughpip install -rinstalls pyyaml 5.3. A pin whose trailing comment ends in a backslash still continues, as in pip. Otherwise the joined text is the same as onmain.INCOMPLETEstays visible once advisories are findings:src/skillevaluator/reporting/cli.py:_print_findingsprintsadditional_warnings(result), the warnings no finding repeats, before the issues. It printed warnings only when a result had no findings.src/skillevaluator/reporting/markdown.py:_render_incompletelistsadditional_warnings(result)when no independent error explains the incomplete scan, HTML-escaped as the error list above it is. It listed warnings only when a result had no findings and no errors, and wrote them raw.src/skillevaluator/validators/policy.py: when an overlay changes a finding's severity,apply_policyrebuilds the result withrecalculate_from_findings, which clears every warning. It now adds backresult.independent_warnings(), the warnings no finding mirrored, read before any severity changes.validatorsdoes not import thereportingpackage for this.src/skillevaluator/models/result.pyandsrc/skillevaluator/reporting/base.py: the matching of legacy lines that only repeat a finding moves fromreporting.base._finding_legacy_linestoValidationResult, asindependent_errors()andindependent_warnings().additional_errorsandadditional_warningskeep their names and return values and now delegate to them.src/skillevaluator/models/result.py:recalculate_from_findingstreated only HIGH and CRITICAL findings as errors. It now also fails a MEDIUM finding whose metadata setsfail_on_medium, so a policy overlay on one advisory keeps afail_on_medium=Truevalidator's other medium pip-audit advisories as errors. Safety findings do not carry the key and stay warnings.src/skillevaluator/tier1/commands.py: the comment above the Tier 1 check steps said the policy normalizes "CVE findings". None of those steps writes aCVEfinding, so a reader would try aCVE.*policy key, which does not touch these advisories; the comment now names theDEPENDENCY.*advisory findings. The comment is the only change in this file.dependencyaccordion indocs/tier1-validation.mdxdescribes how a comment line ends a continuation, the finding, its metadata,unboundadvisories, the role words, Safety severity (a score outside 0 to 10 is skipped) and de-duplication, folder runs, which severities fail the run (includingfail_on_mediumfrom Python),DEPENDENCY.<advisory-id>/DEPENDENCY.*policy overrides, and where theINCOMPLETEreasons appear. On folder runs it says: every skill is audited;validateon a folder of skills runs each skill as its own job, so each report lists its advisories; only when one dependency check covers several skills (validate --type rulesor--type workflowson a folder, orDependencySecurityValidator().validate()on a folder in Python) is a passing skill summarized as one passed check, without its medium or low advisories, and a policy override cannot raise those.The closed plugin-evaluation PR #28 carried a version of this fix inside its larger change; this PR lands the generic part on its own.
Why
A vulnerable pin failed the run, but nothing downstream could see why:
findingswas empty andhigh_countwas 0 for a high advisory.CATEGORY.check_nameof findings, so it could not accept or raise one advisory.With Safety installed, an advisory with
"severity": nullin Safety's JSON stopped the wholedependencycheck withAttributeError: 'NoneType' object has no attribute 'lower'. With an API key, Safety prints severity as a CVSS object, andmainfailed the same way on it. The exception propagates out ofDependencySecurityValidator.validate()and the Tier 1 check loop, which has no handler for it. The new CVSS reading skips abase_scoreinteger too large for a float rather than passing it tomath.isfinite, which raisesOverflowErroron it.A comment line ending in a backslash let a target hide a vulnerable pin from the audit while
pip install -rstill installed it, as described above.Turning advisories into findings also made them reach code that only looked at findings, so this PR adjusts that code:
validate skills --type rules --checks dependencywith a critical advisory in the first skill audited only that skill. A policy that accepted the advisory then passed the run (exit 0, one pip-audit call) while a later skill's high advisory was never audited.recalculate_from_findingschange,DependencySecurityValidator(use_safety=False, fail_on_medium=True)onidna==3.6(a medium advisory) andpyyaml==5.3failed, but after a policy setDEPENDENCY.PYSEC-2020-176: lowit passed, and the medium advisory the policy never named became a warning. Onmaina policy never touched dependency results. The CLI does not setfail_on_medium, so only Python callers saw this.[INCOMPLETE] pip-audit did not completein the CLI and Markdown reports without the warning that names the unpinned line, and a policy override on any advisory removed that warning from every report.requirements-<img src=x onerror=alert(1)>.txt. The Markdown report escapes the same name in its findings table and errors, so it escapes the warnings too.Kept from public
pip-audit -r <sanitized> --no-deps --disable-pipruns frommainare unchanged: ranges, URLs, includes, pip options and unevaluable markers still make the auditINCOMPLETE, and nothing is resolved or installed. The structured findings sit on top of that._validated_pip_audit_report, the exit-code checks, inventory matching, skipped-package handling anddependency_coverageare unchanged.fail_on_mediumstill applies to pip-audit advisories and not to Safety.mainmarks a range or bare nameINCOMPLETE, so this PR does not add an informational "version not pinned" finding, and it does not read Poetry tables.requirements-latest.txtandrequirements-device.txtstayruntime, where substring matching would call themtestanddev. The common compound names (devel,devtools,unittest,pytest,testutils) are listed so they keep the role substring matching gives them.lint,linting,docanddocumentationare also roles here; substring matching calls themruntime.--continue-on-failureis set; only the dependency audit's own folder loop ignores it, and the scope is restored when the audit returns.<,>and&in a warning are now escaped.recalculate_from_findingsstill clears warnings;apply_policyadds back the independent ones. Its error rule changes only for a MEDIUM finding whose metadata setsfail_on_medium, which only the dependency audit writes._process_pip_audit_resultcalled without declarations still emits the tagged[CVE-...]message. A caller onmainthat audits pins it collects itself (plugin_dependency_audit.py) calls it that way and converts the message into its own finding throughreport_value, so its output does not change.dependencies.py.validators/policy.py(new policy fields and loading),reporting/base.py(render_reportandsave),reporting/cli.py(one hunk inCLIReporter.print_all, line 168 onmain) andtier1/commands.py(newrun_validationparameters and a plugin branch at the start of its body). This PR changesapply_policy, theadditional_errors/additional_warningshelpers,CLIReporter._print_findingswith its import, and a comment above the Tier 1 check steps, so the hunks are disjoint.reporting/base.pyin the publication gate, per its description. Its fork branch is not available locally, sogit merge-treewas not run against it; theadditional_*helpers this PR changes are not part of that gate.models/result.pyinmergeandmerge_with_prefix. This PR changesrecalculate_from_findingsand addsindependent_errors()andindependent_warnings()after it.reporting/cli.pyorreporting/markdown.py; fix(tier1): scope ownership email policy and retain completeness diagnostics #333, feat(quality): configure Reliability error handling in the quality config #336, fix(tier1): report manifest checks as N/A when validate finds no supported artifact #410, fix(tier1): retry an invalid rubric judge reply once and name the problem #415 and fix(reporting): name the skill in single-skill JSON reports and record the evaluator version #424 changedocs/tier1-validation.mdx; and fix(tier1): report manifest checks as N/A when validate finds no supported artifact #410 and fix(reporting): name the skill in single-skill JSON reports and record the evaluator version #424 changetier1/commands.py. The hunks here touch other lines. Every open PR adds aCHANGELOG.mdentry.reporting/cli.pyorreporting/markdown.py, have merged, and feat(ci): add three-tier onboarding and private report feedback #349 and docs: simplify repository CI onboarding #443 merged a change todocs/tier1-validation.mdx. This branch now sits on their code:mainmerged into it without a conflict in those files.mainat d717f22,git merge-treegives feat(tier3): add selectable NeMo Gym execution backend #225, Enable public plugin assessment and saved-run reports #394 (head fa5ca24), fix(reporting): describe a failed Tier 3 arm as incomplete, not as not run #407 and feat(tier3): report token usage per case and agent #427 the same conflicting hunks with this branch as withmainitself, so this PR adds none. fix(tier3): decode inline and Promise.allSettled Codex wrappers (#235) #325 merges cleanly, and fix(tier1): report manifest checks as N/A when validate finds no supported artifact #410, fix(tier1): retry an invalid rubric judge reply once and name the problem #415 and fix(reporting): name the skill in single-skill JSON reports and record the evaluator version #424 conflict with this branch only inCHANGELOG.md. Before this merge the branch showed no conflict with feat(datasets): record how a dataset was generated and show it on reports #405, and with fix(tier1): scope ownership email policy and retain completeness diagnostics #333 only the 4 conflicts fix(tier1): scope ownership email policy and retain completeness diagnostics #333 already had withmain; those heads are not available locally now. The branches of fix(reporting): let default Tier 3 runs with a baseline pass publication #332 and feat(quality): configure Reliability error handling in the quality config #336 are not available locally either.mainthere), so whichever of them and this PR merges later needs a CHANGELOG fixup.git merge-tree --write-tree HEAD mainwithmainat d717f22 is clean.Tests
tests/validators/test_dependency_advisory_findings.py(91 tests):requirements.txtadvisory: category, check name, severity, message, file and line, suggestion, full metadata,high_count, and the legacy error stringpyyaml==5.3advisory after a hashedidnapin has line 3 in JSONfindingsand in the SARIF region, ruleDependency-Vulnerability-Audit/PYSEC-2020-176, levelerrorPillow_SIMD==9.0is audited aspillow-simd==9.0and keeps its declared spellingrequirements-devtools.txt,requirements_unittest.txtandrequirements-lint.txt, andrequirements-latest.txtandrequirements-docker.txtasruntime) and from the optional group name (9 cases)pyproject.toml: declared pin, declaration position anddocsrole from an optional group; a pin repeated intestkeeps its runtime declaration;fail_on_mediumstill fails on a medium advisoryrun_validation(checks="dependency")andemit_reports, as the Tier 1 commands run it: aDEPENDENCY.*: lowoverride lowers the advisory and the reports pass; aCVE.*: lowoverride leaves it high and the run failsDEPENDENCY.PYSEC-2020-176: lowpasses the run; with a range pin, the overlaid result keeps theline 2 requires an exact package versionwarning, and a secondapply_policychanges nothingfail_on_medium=True, the same overlay keeps the mediumidnapip-audit advisory as the one error, the run still fails, and a medium Safety advisory stays a warning without thefail_on_mediumkeyskillevaluator.reportingmodulevulnerable_spec,fixed_versionsandCVE; seven malformed outputs complete without a crash, including a number and an object asadvisory; 18 severity values, including the object Safety prints with an API key (critical, run fails), v3 and v2 scores, both key spellings, bool, NaN and out-of-range scores (medium),10**400as the v3 score and-(10**400)with a 400-digit v2 score (medium), and an infinite v3 score that falls through to a v2 score of 7.5 (high); 5 ID forms, including JSON numbers (SAFETY-51457); a copy of a pip-audit advisory under its CVE or ID is dropped while other Safety advisories stay; an advisory for a marker-skipped pin isunbound"severity": nullis HIGH from itsPYSECIDmain'sre.sub(r"\\\r?\n", " ", text).splitlines()on 11 inputs without a comment continuation, with the expected line numbers, including form feed, vertical tab,\x85,\u2028and\x1ecasesidna==3.10,# pinned for py2 \,pyyaml==5.3sends both pins to pip-audit and reports PYSEC-2020-176 on line 3requirements-<img src=x onerror=alert(1)>.txtnext to an advisory is written as<img ...>(the warning is added to a real audit result, because Windows does not allow<or>in file names); with an execution error and no finding it still shows only the error_process_pip_audit_resultstill emits[CVE-HIGH] foo==1.0: GHSA-xand no findingsrc/frommainat d717f22 and this test module, 88 failed and 3 passed. The 3 pin kept behavior: the non-listvulnerabilitiescase, the tagged message without declarations, and the Markdown report with an execution error. The 15 joiner cases fail onmainbecause they call the new_requirement_lineshelper; the object-advisorycase fails withKeyError.src/from 903ffd6, before the comment andfail_on_mediumfixes, 9 failed and 82 passed: three comment-line joiner cases, the pin after a commented backslash, thefail_on_mediumpolicy case, and the 4 tests that also fail at 83583cc (next item). The trailing-comment case passes there too, because that behavior did not change.src/from 83583cc, before the last 4 fixes, 4 failed and 87 passed: the two huge-integer severity cases (OverflowError: int too large to convert to float), the Markdown escape test (the raw<imgis in the report), and the fresh-interpreter policy test (apply_policyloadedskillevaluator.reporting.baseand 14 other reporting modules). The infinite-score case passes there too, becausemath.isfinitehandled it.src/from a402a2a, before thetier1/commands.pycomment fix, 91 passed. The fix changes a comment only, so no test can fail before it; the 2 new Tier 1 override tests fail onmain, where the advisory is not a finding.preprocesson 100,000 generated requirements files: pins,--hashoptions, comment lines and trailing comments, each with or without a trailing backslash, LF or CRLF, ending in a newline. Whitespace placement was ignored, because this joiner turns a continuation into a space and pip into nothing. 0 differences on the branch, 16,877 before the comment fix.mainat d717f22 merged in:tests/validators/test_dependency_advisory_findings.py,test_security_validators.py,test_target_dependencies.py,test_static_requirements_audit.pyandtest_private_dependency_audit.py: 255 passed.tests/validators/test_policy.pyandtests/models: 60 passed.tests/reporting/test_mixed_execution_errors.py, which coversadditional_errorsandadditional_warningswith and without skill prefixes: 7 passed.tests/validators,tests/reporting,tests/modelsandtests/cliwith-n 4: 6302 passed, 2 skipped.teststree with-n 6: 27456 passed, 35 skipped, 6 failed. The 6 failures also fail withmain's tree at d717f22 on this machine: the CI bootstrapPYTHONPATHtest and the 2 feedback launcher tests intests/ci, the bounded Harbor process timeout test, and 2 secure Docker sidecar tests. This PR does not touch CI or Harbor code.git merge-treebuilt from this branch and Enable public plugin assessment and saved-run reports #394's head (fa5ca24): the new module,tests/validators/test_policy.py,test_public_plugin_policy.pyandtests/reporting/test_public_plugin_reports.py: 148 passed. That head now conflicts withmainitself, inCHANGELOG.mdand files this PR does not change, so the tree cannot be built again.ruff checkandruff format --checkare clean on the changed Python files, andscripts/check_oss_boundary.pypasses.🤖 Generated with Claude Code