SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS)
This report summarizes scanner evidence for scinfu/SwiftSoup, a Swift project with 5,133 GitHub stars. SynthScan examined 77,710 lines of code across 288 source files, recording 100 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 1.7 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 69 finding(s).
Are imports declared and package/API names verified? 22 finding(s).
Are wrappers, guards, and repeated structures necessary? 21 finding(s).
Which changes need focused human review? 100 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 100 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Tests/SwiftSoupTests/XmlTreeBuilderTest.swift | 161 | // Document htmlDoc = Jsoup.connect(xmlUrl).parser(Parser.htmlParser()).get(); | COMMENT |
| LOW | Tests/SwiftSoupTests/TextUtil.swift | 21 | range: NSRange(0..<text.count), | COMMENT |
| LOW | Tests/SwiftSoupTests/TextUtil.swift | 41 | // } | COMMENT |
| LOW | Tests/SwiftSoupTests/CleanerTest.swift | 221 | XCTAssertEqual("<p class=\"foo\">One</p>", clean) | COMMENT |
| LOW | Tests/SwiftSoupTests/AttributesTest.swift | 41 | // do{ | COMMENT |
| LOW | Tests/SwiftSoupTests/ElementTest.swift | 601 | //todo:datase is a simple dictionary but in java it's different | COMMENT |
| LOW | Tests/SwiftSoupTests/ElementTest.swift | 621 | // XCTAssertEqual("java", try attributes.get(key: "data-language")); | COMMENT |
| LOW | Tests/SwiftSoupTests/FormElementTest.swift | 21 | } | COMMENT |
| LOW | Tests/SwiftSoupTests/FormElementTest.swift | 41 | // XCTAssertEqual("eight=on", data.get(5).toString()); // default | COMMENT |
| LOW | Tests/SwiftSoupTests/FormElementTest.swift | 61 | // Connection con2 = form.submit(); | COMMENT |
| LOW | Tests/SwiftSoupTests/FormElementTest.swift | 81 | // | COMMENT |
| LOW | Tests/SwiftSoupTests/FormElementTest.swift | 121 | // let doc = try Jsoup.parse("<form><input type=checkbox checked name=foo></form>"); | COMMENT |
| LOW | Tests/SwiftSoupTests/DocumentTest.swift | 1 | // | COMMENT |
| LOW | Tests/SwiftSoupTests/DocumentTest.swift | 21 | // "<head>" + | COMMENT |
| LOW | Tests/SwiftSoupTests/DocumentTest.swift | 41 | // for el in els{ | COMMENT |
| LOW | Tests/SwiftSoupTests/DocumentTest.swift | 141 | // String location = doc.location(); | COMMENT |
| LOW | Tests/SwiftSoupTests/DocumentTest.swift | 441 | } | COMMENT |
| LOW | Tests/SwiftSoupTests/StringUtilTest.swift | 1 | // | COMMENT |
| LOW | Tests/SwiftSoupTests/StringUtilTest.swift | 21 | // | COMMENT |
| LOW | Sources/FormElement.swift | 81 | // Connection.Method method = attr("method").toUpperCase().equals("POST") ? | COMMENT |
| LOW | Sources/FormElement.swift | 101 | // if (el.hasAttr("disabled")) continue; // skip disabled form inputs | COMMENT |
| LOW | Sources/SwiftSoup.h | 1 | // | COMMENT |
| LOW | Sources/ElementQuery.swift | 1 | // | COMMENT |
| LOW | Sources/ElementQuery.swift | 21 | /// ``` | COMMENT |
| LOW | Sources/ElementQuery.swift | 41 | /// - parameter className: The class name to check for. | COMMENT |
| LOW | Sources/ElementQuery.swift | 61 | /// Get the inner HTML of the matched elements. | COMMENT |
| LOW | Sources/LRUCache.swift | 1 | // | COMMENT |
| LOW | Sources/LRUCache.swift | 21 | // all copies or substantial portions of the Software. | COMMENT |
| LOW | Sources/SwiftSoup.swift | 261 | guard let next = iterator.next() else { return true } | COMMENT |
| LOW | Sources/SwiftSoup.swift | 281 | //todo: | COMMENT |
| LOW | Sources/SwiftSoup.swift | 301 | // @param in file to load HTML from | COMMENT |
| LOW | Sources/SwiftSoup.swift | 321 | // | COMMENT |
| LOW | Sources/SwiftSoup.swift | 361 | - returns: sane HTML document | COMMENT |
| LOW | Sources/Elements.swift | 1 | // | COMMENT |
| LOW | Sources/BinarySearch.swift | 1 | // | COMMENT |
| LOW | Sources/BinarySearch.swift | 21 | /// | COMMENT |
| LOW | Sources/BinarySearch.swift | 41 | low = index(after: mid) | COMMENT |
| LOW | Sources/StringUtil.swift | 321 | // | COMMENT |
| LOW | Sources/StringUtil.swift | 1181 | accum.write(contentsOf: basePtr.advanced(by: idx), count: runEnd - idx) | COMMENT |
| LOW | Sources/StringUtil.swift | 1201 | // } else if (lowerIndex > upperIndex) { | COMMENT |
| LOW | Sources/Node.swift | 161 | self.attributes = nil | COMMENT |
| LOW | Sources/QueryParserCache.swift | 1 | // | COMMENT |
| LOW | Sources/QueryParserCache.swift | 21 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | Tools/compare_tokenqueue_search.py | 0 | fresh-process release comparisons with full output verification and balanced order. requires python 3, numpy and scipy. | STRING |
| HIGH | Tools/compare_exclusion.py | 0 | fresh-process release comparisons with full output verification and balanced order. requires python 3, numpy and scipy. | STRING |
| HIGH | Tools/compare_ordered_insertion.py | 0 | fresh-process release comparisons with full output verification and balanced order. requires python 3, numpy and scipy. | STRING |
| HIGH | Tools/compare_independent_hotspots.py | 0 | fresh-process release comparisons with full output verification and balanced order. requires python 3, numpy and scipy. | STRING |
| HIGH | Tools/compare_child_reads.py | 0 | fresh-process release comparisons with full output verification and balanced order. requires python 3, numpy and scipy. | STRING |
| HIGH | Tools/compare_character_classification.py | 0 | fresh-process release comparisons with full output verification and balanced order. requires python 3, numpy and scipy. | STRING |
| HIGH | Tools/compare_cursor_moves.py | 0 | fresh-process release comparisons with full output verification and balanced order. requires python 3, numpy and scipy. | STRING |
| HIGH | Tools/compare_blank_text.py | 0 | fresh-process release comparisons with full output verification and balanced order. requires python 3, numpy and scipy. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 19 | def test_valid_record_is_not_rewritten(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 23 | def test_wrong_iteration_count_is_rejected_even_with_plausible_checksum(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 27 | def test_zero_checksum_cannot_hide_wrong_iteration_count(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 32 | def test_workload_must_match_the_requested_operation(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 36 | def test_calibration_checks_the_checksum_too(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 40 | def test_expected_value_cannot_drift(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 44 | def test_duration_must_be_positive(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 49 | def test_counts_must_be_integers_not_coercible_values(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 55 | def test_schema_rejects_missing_extra_and_nonobject_values(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 62 | def test_verifier_requires_complete_nonempty_record_array(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 70 | def test_verifier_uses_exact_bytes_not_just_json_equality(self): | CODE |
| LOW⚡ | Tools/tests/test_character_classification_runner.py | 74 | def test_workloads_are_known_nonempty_and_unique(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 192 | let textBlock = String(repeating: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 20) | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 192 | let textBlock = String(repeating: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 20) | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 402 | let paragraph = String(repeating: "Hyperion lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 6 | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 402 | let paragraph = String(repeating: "Hyperion lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 6 | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 455 | let paragraph = String(repeating: "Leviathan lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 455 | let paragraph = String(repeating: "Leviathan lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 497 | let paragraph = String(repeating: "Gargantua lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 497 | let paragraph = String(repeating: "Gargantua lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 539 | let paragraph = String(repeating: "Behemoth lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 1 | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 539 | let paragraph = String(repeating: "Behemoth lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 1 | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 600 | let paragraph = String(repeating: "Colossus lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 1 | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 600 | let paragraph = String(repeating: "Colossus lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 1 | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 633 | let paragraph = String(repeating: "Nebula lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 220 | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 633 | let paragraph = String(repeating: "Nebula lorem ipsum dolor sit amet, consectetur adipiscing elit. ", count: 220 | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 976 | let sentence = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " | STRING |
| LOW | Tests/SwiftSoupTests/BenchmarkProfileTest.swift | 976 | let sentence = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " | STRING |
| LOW | Tests/SwiftSoupTests/CssTest.swift | 127 | XCTAssertEqual(value, "John Doe") | STRING |
| LOW | Tests-macOS/corpus/GitHub.html | 1282 | <span class="pl-k">let</span> html<span class="pl-k">:</span> <span class="pl-c1">String</span> <span class="pl-k">= | CODE |
| LOW | Tests-macOS/corpus/GitHub.html | 1354 | <span class="pl-c"></span> <span class="pl-k">try</span> div.<span class="pl-c1">html</span>(<span class="pl-s"><span | CODE |
| LOW | Tests-macOS/corpus/GitHub.html | 1358 | <span class="pl-c"><span class="pl-c">//</span> now div is: <div><p>First</p><p>lorem ipsum& | CODE |
| LOW | Tests-macOS/corpus/Amazon.html | 87 | autofocus:function(){return"autofocus"in h.createElement("input")},inputPlaceholder:function(){return"placeholder"in h.c | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Tools/compare_tokenqueue_search.py | 14 | CODE | |
| LOW | Tools/compare_exclusion.py | 17 | CODE | |
| LOW | Tools/compare_child_reads.py | 21 | CODE | |
| LOW | Tools/compare_ordered_insertion.py | 17 | CODE | |
| LOW | Tools/compare_sibling_endpoints.py | 8 | CODE | |
| LOW | Tools/compare_entity_benchmarks.py | 24 | CODE | |
| LOW | Tools/compare_character_classification.py | 51 | CODE | |
| LOW | Tools/compare_whitespace_runs.py | 21 | CODE | |
| LOW | Tools/compare_cursor_moves.py | 20 | CODE | |
| LOW | Tools/compare_pattern_reuse.py | 20 | CODE | |
| LOW | Tools/compare_independent_hotspots.py | 17 | CODE | |
| LOW | Tools/compare_blank_text.py | 16 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Tests-macOS/corpus/GitHub.html | 1466 | <p>SwiftSoup elements support a <a href="https://www.w3.org/TR/2009/PR-css3-selectors-20091215/" rel="nofollow">CSS</a> | CODE |
| MEDIUM | Tests-macOS/corpus/Wikipedia.html | 341 | <p><a href="/wiki/Mars_Base_Camp" title="Mars Base Camp">Mars Base Camp</a> (MBC), an American spacecraft concept that p | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Tests/SwiftSoupTests/StringUtilTest.swift | 17 | // print("Error: \(myURLString) doesn't seem to be a valid URL") | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Tools/compare_entity_benchmarks.py | 8 | CODE |