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>
# Conflicts: # docs/reference/matrix-updates/0.11.0-rules.tsv
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
… (A14, review) Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
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 2.1 of the 0.11.0 plan (#367), row A14 of the BootUI 2.6.0 delta: the source index excludes the application's
own test modules, so architecture rules and every other reader of the index (FastAPI advisor, config scan, security
static rules, import graph, REST API tools) no longer report findings on test code, as BootUI 2.6.0
ArchitectureRuleSupport.isTestOutputexcludes test output before any rule runs.src/sharpit/engine/appsource.py:is_test_module(name_parts, filename)matches a path segment or a module filenamed
tests,testortesting, and the filesconftest.py,test_*.pyand*_test.py; it never matches bysubstring (
attestation.py,contests.py,backtest.pystay indexed). The index records the dotted names itskipped (
excluded_tests), and skipped files do not use the file budget.src/sharpit/engine/collectors/architecture/graph.py: imports resolve to the longest known module as before; animport of a skipped test module stays a visible edge to an unresolved target, as BootUI keeps production
dependencies on test targets.
src/sharpit/engine/collectors/architecture/report.py: a package with no production module is scanned with zerorules evaluated and
evidence.usable = false, as BootUI'sArchitectureScannerdoes for an empty class set.src/sharpit/engine/collectors/architecture/rules.py: ARCH-CODE-013 uses the same predicate.docs/reference/matrix-updates/0.11.0-rules.tsv: rowA14(adapted: Python source modules instead of compiled testoutput; JAR archives and bytecode subtype projection have no counterpart).
Behaviour change for users: findings in modules under
tests/,test/ortesting/, or inconftest.py,test_*.py,*_test.py,tests.py,test.pyortesting.py, are no longer reported. A production package namedtestingis excluded too.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. This pull request's changes are the files above and their tests (
tests/engine/test_appsource.py,tests/engine/collectors/architecture/,tests/fastapi/test_error_contract_introspection.py).Red evidence
Tests were committed before each change; each red is an assertion (
scripts/dev/red_check.py).ARCH-CODE-001reportedapp.tests.test_xandapp.conftesttest_test_modules_excluded_from_index,test_recognized_test_modules_do_not_add_findings_or_application_classestest_test_only_package_is_complete_empty_but_not_usable_application_evidencetest_test_only_package_back_edges_disappear_but_real_production_cycles_remain,test_real_production_dependencies_on_internal_test_targets_are_not_waivedtest_from_imported_function_resolves_to_longest_known_moduletest_cycle_is_kept_when_import_target_is_missingtests.pymodule file stayed indexed (review)test_test_module_files_are_excluded_from_indexThe BootUI tests ported (
# ported:) come fromArchitectureTestOutputIsolationTests.tests/fastapi/test_error_contract_introspection.pynow points its source-index test at a non-test package, becausethe module it used is a test module and is excluded by design.
Verification
uv run ruff check,uv run ruff format --check,uv run pyright(0 errors); 18005 passed over the engine, FastAPI,Flask, parity, docs, CLI, masking and root tests; the three overhead budget tests that failed under parallel load
pass alone. The full suite runs in CI.