Repository navigation
Conversation
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
… file Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…e protocol Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
The Origin header is parsed as scheme://host[:port] with an http or https scheme, as BootUI 2.6.0 does: a path (a trailing slash included), query, fragment, userinfo, control character, trailing colon, unsupported scheme or a port above 65535 makes the origin unreadable, and an unreadable origin is cross-site. The value is no longer trimmed.\n\nA port of more than five digits is refused before int() converts it, in the origin and in the request's own Host, so a very long port is a cross-site refusal and no longer an unhandled ValueError. Adds a property test of the origin parser. Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…UI 2.6.0) A write that carries Sec-Fetch-Site must send same-origin or none (ASCII, case-insensitive); same-site, cross-site, an empty value and any unknown value are refused. A present but empty Origin header is an unreadable origin and is cross-site, no longer read as absent. A same-site navigation GET still loads the shell, and an API path still requires the request's own scheme, host and port. A request whose own origin cannot be formed stays cross-site where that comparison applies.\n\nDocuments the rule in SECURITY.md and the BootUI contract note, and records the deviations in the 0.11.0 guard matrix fragment. Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Record the two deviations of the inactivity log from BootUI 2.6.0 in a matrix fragment, update the MVP plan text that still described the old log line, extract the inactivity logging of install() into a helper to keep its complexity at the pinned count, and wrap one over-long test assertion. Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
An invalid SHARPIT_ENABLED must log exactly one record, the fixed warning, as BootUI does. The count of the remaining configuration warnings stays. Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
An invalid SHARPIT_ENABLED is already reported by the fixed inactive warning. Counting its settings warning as well produced a second WARNING record, where BootUI logs one. Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
…tests Port BootUiInactiveStartupDiagnosticTests.deliberateDisablementIsSilentAtInfo, cite the BootUI tests the other inactivity tests port, and keep the expected log texts in one test module. A single Inactivity alias types the inactivity category. The matrix row for the warning count records that it leaves out the invalid SHARPIT_ENABLED warning. Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com> # Conflicts: # tests/fuzz/test_trust_boundary_fuzz.py
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
# Conflicts: # docs/reference/matrix-updates/0.11.0-github.tsv # src/sharpit/engine/collectors/github/client.py
This branch has not been deployed
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.
Summary
Task 1.9 of the 0.11.0 plan (#367), row C4 of the BootUI 2.6.0 delta: the vulnerability report states, per dependency,
which advisories the scan found but could not assess, instead of reporting such a dependency as clean.
src/sharpit/engine/collectors/vulns/assessment.py(new):assessment_dtobuildsDependencyAssessmentDto(
queryComplete,detailAssessmentComplete,unassessedAdvisoryIds,unassessedAdvisoryCount) with BootUI's threeinvariants and messages;
assessmentis the builder (DependencyReports.assessment): distinct ids in order, apreview of at most 100 ids of at most 240 characters with no ISO control characters and no Java-blank ids, and a
count of every distinct id.
src/sharpit/engine/collectors/vulns/service.py: advisories the OSV query names but whose details are not assessed(detail fetch failed, cut by the deadline, the body cap or the advisory cap) become candidates, never findings, and
survive dismissals and EPSS. An advisory with an unparseable
withdrawnvalue stays a finding with UNKNOWN severityand the scan is
PARTIAL(OsvVulnerabilityScanner687-692). No extra request is made at the advisory cap.src/sharpit/engine/tools.py(get_vulnerabilities_report): dependencies sort findings first, then candidates,then clean; each keeps at most 3 candidate ids (query matches first; candidate ids pass through the text masker, while advisory
ids are not masked, as before); a top-level
advisoriesobject (listed,omitted,detailsOmitted,perDependency,unassessedCandidates,candidateIdsListed,candidateIdsOmitted,hint) in BootUI's key order. The hint describes sharpit's view.ui/src/views/Vulnerabilities.svelte,lib/score.ts,lib/types.ts; rebuiltsrc/sharpit/ui/static/): adependency with only candidates shows "Not assessed"; the summary shows "Assessment incomplete" when candidates exist
and no active finding does.
docs/reference/BOOTUI-CONTRACT-MVP.md(the assessment DTO) anddocs/reference/matrix-updates/0.11.0-vulns.tsv.Deviations from BootUI
advisories.hintis reworded: sharpit keeps 5 advisories per dependency with their masked details (sodetailsOmittedis 0), has no exact-query expansion, and omits clean dependencies when there is no query (BootUIlists them last);
page.totalcounts the filtered list.METADATA_ONLYexposure candidate ids are dropped (the count stays exact); BootUI has no such exposure level.vulnerabilities_scanreturns the full report, where BootUI returns a compact summary (an earlier deviation).Review scope
The branch was cut from the 0.11.0 integration line, so against
mainthe diff also shows the earlier 0.11.0 pullrequests (#368 to #378). This pull request's changes are in the files listed above and their tests.
Red evidence
Each test was run against a commit with the tests and a stub
assessmentreturning a wrong value, or against the codebefore the fix (
scripts/dev/red_check.py); each red is an assertion.test_service.py::test_candidates_are_not_findings_and_survive_dismissals_and_epss,test_per_dependency_completion[...],test_all_detail_failures_retain_distinct_candidates_...assessmenttest_advisory_cap_retains_bounded_candidate_preview_and_exact_count_without_extra_fetchestest_assessment.py(bounds, invariants, control characters)test_tools.py::test_mcp_query_only_candidates_remain_searchable_...,test_mcp_candidate_totals_survive_paging_and_search_...,test_mcp_vulnerabilities_masks_candidate_idsSCANNEDstatus (review)test_per_dependency_completion[malformed-withdrawal-...]test_mcp_vulnerabilities_advisories_hint_is_exact,test_mcp_vulnerabilities_exact_package_query_keeps_five_advisories_with_detailsvulnerabilities.test.tssummary cases (SCANNED/PARTIAL with candidates, PARTIAL with none)test_descriptions_ported_with_names_substitutedtest_java_non_whitespace_space_separators_remain_candidate_ids,test_java_line_and_paragraph_separators_are_blank_candidate_idsVerification
uv run ruff check,uv run ruff format --check,uv run pyright(0 errors); targeted run overtests/engine,tests/fastapi,tests/masking,tests/safety,tests/parityand the shape, citation, docs and UI-rule tests: 14,233passed (the request-overhead budget test, which fails only under parallel load, passed alone);
npm testinui/:378 passed. The full suite runs in CI.