Skip to content

Remove leftover Wappalyzer metadata from web_technologies regexes - #1958

Open
NSK-394 wants to merge 1 commit into
OWASP:masterfrom
NSK-394:fix-web-technologies-wappalyzer-suffix
Open

NSK-394 wants to merge 1 commit into
OWASP:masterfrom
NSK-394:fix-web-technologies-wappalyzer-suffix

Conversation

@NSK-394

@NSK-394 NSK-394 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Closes #1945

This is the first batch of #1945. It replaces #1957, which the contribution bot closed because the closing reference was missing when it was opened. About 440 lines remain, so I will open a follow-up issue and ask for assignment before sending the next batch.

Proposed change

Many regexes in nettacker/modules/scan/web_technologies.yaml still carry Wappalyzer's version-extraction suffix (\;version:\1, \;confidence:NN). In a Python regex \; is a literal ;, so the pattern also requires the text ;version: in the response, which real servers never send. The fingerprint therefore cannot match. This PR removes the suffix from 20 lines: the Nginx Server regex (it only matches if the response contains ;version:) and 19 single-line regexes where an unescaped $ sits right before the suffix, which makes a match impossible. Only the suffix text is removed from those lines; everything else is unchanged (20 insertions, 20 deletions, 238 characters removed). Versions are not reported; this is detection only.

Not in this PR:

  • Seven other places where $ precedes the suffix are left out on purpose. Four single-line entries: Botble (its confidence:0 made it a weak fingerprint, so stripping it would make it over-broad), CodeIgniter (stripping changes nothing), FancyBox and Inveon (content patterns where $ means the end of the body). Three multi-line content patterns (Elementor, Gravity Forms, SonarQube) that my issue's count missed: in each only the last | branch is dead and the other branches still match.
  • About 440 other lines carry the suffix without a $ (for example Apache and Python's SimpleHTTP; I confirmed both are missed on real containers).

Verification

Real containers on an isolated Docker network with no published ports, web_technologies_scan, technologies reported on upstream/master (2f23fab) and on this branch:

Target What the server sends master branch
nginx:stable 1.30.4 Server: nginx/1.30.4 none Nginx
nginx:stable, server_tokens off Server: nginx none Nginx
easyengine/nginx-proxy:v4.15.0 (one hand-written vhost) X-Powered-By: EasyEngine v4 none EasyEngine, Nginx
sanluan/publiccms:V6 + mysql:8.4.13 (after the installer) X-Powered-PublicCMS: V6 none Public CMS
pandoc/core:3.14.0 (Warp) Server: Warp/3.4.21 on /version; GET / returns 405 none none (the scan cannot see it)
kibana:8.19.23 (setup mode) no kbn-version on /, /login or /api/status none none
httpd:2.4.71-alpine Server: Apache/2.4.71 (Unix) UNIX UNIX
caddy:2.11.9-alpine Server: Caddy Caddy Caddy
python:3.11-slim http.server Server: SimpleHTTP/0.6 Python/3.11.16 none none

Apart from the intended new detections (Nginx, EasyEngine, Public CMS) the two states are identical. Apache and Python are missed in both states because they carry the suffix without $ (not in this batch).

I also ran the Nginx case myself on the official nginx container (Server: nginx/1.30.4, port 8081, real CLI: python nettacker.py -i 127.0.0.1 -m web_technologies_scan -g 8081 -t 1 -M 1 --skip-service-discovery).

Before, upstream master (61bab4e): no technology reported, only the generic status row.

After, this branch: "Nginx Found".

Real software: Nginx, EasyEngine (v4.15.0) and Public CMS (V6) are detected on this branch and not on master. The Nginx run I did myself; the others were run by Claude Code against pinned images on an isolated network, and I reviewed the captured headers. Warp's real header matches the edited regex, but the pandoc server I could run answers GET / with 405, so the module cannot see it. Kibana 8.19.23 does not send kbn-version at all, so that fingerprint is stale for current Kibana (the edit is still correct; it just cannot fire there). I did not run Shopware (1.6 GB); from its source the two headers are not sent on GET /. The remaining entries are covered only by unit tests with sample responses built from each product's source or documentation (links in the test file): several are SaaS or proprietary (Oracle Commerce Cloud, Shopfa, SharePoint), and the others (Kooboo, Umbraco, Neos, Sulu, CppCMS, Aegea, PHPFusion, Arastta) need a source build or a database, or have no maintained image. Where I found no vendor documentation (Aegea, Arastta, Kooboo, Oracle Commerce Cloud, PHPFusion, Shopfa) the sample comes from the webappanalyzer fingerprint, so it is not verified against the real product.

Tests: tests/unit/test_web_technologies_scan.py (233 tests) runs each edited entry through TemplateLoader and response_conditions_matched, the same path the module uses. It checks a positive sample, a negative sample, eight neutral server responses, that the suffix is gone, and that no edited regex matches the empty string.

  • On master's YAML, 59 of them fail (all assertion failures). On this branch all 233 pass: 3 runs on Windows (Python 3.10.11) and 3 in a Python 3.11.16 container.
  • Negative control: reverting the YAML makes the tests fail, and restoring it gives an identical diff.
  • tests/unit/test_yaml_schema_and_regex.py still passes (134 passed, 6 skipped).
  • Full unit suite in the container: 839 passed, 6 skipped, 2 xfailed (baseline on master: 606 passed, 6 skipped, 2 xfailed).
  • ruff 0.1.13 (the pinned version) and the other pre-commit hooks pass.
  • I also ran pre-commit and the test suite locally on Windows (Python 3.10.11): all hooks pass and all tests pass.

Limits and questions

  • Not verified: EasyEngine was tested with one hand-written vhost (no HTTPS; its HTTPS template adds an HSTS add_header that may drop the header), Public CMS only on / after the install, Kibana only in setup mode without Elasticsearch, and Warp only where / is not 200. Some unit test samples are older than what the real products send (Kibana 4.5 kbn-version, EasyEngine 2.2.3, Public CMS V5); the real responses also match the regexes, except Kibana 8, which sends no kbn-version. The Public CMS header format and the Shopware headers on GET / are unconfirmed.
  • Should further batches be about this size, or larger?
  • Should captured versions be reported at some point, or only the technology name?

AI tools were used in preparing this PR. I reviewed the diff and the tests and can explain every change.

Type of change

  • New core framework functionality
  • Bugfix (non-breaking change that fixes an issue)
  • Code refactoring without any functionality changes
  • New or existing module/payload change
  • Documentation/localization improvement
  • Test coverage improvement
  • Dependency upgrade
  • Other improvement (best practice, cleanup, optimization, etc)

Checklist

  • I've followed the contributing guidelines
  • I've digitally signed all my commits in this PR
  • I've run make pre-commit and confirm it didn't generate any warnings/changes
  • I've run make test and I confirm all tests passed locally
  • I've added/updated any relevant documentation in the docs/ folder (no user-facing behavior or description text changed)
  • I've linked this PR with an open issue
  • I've tested and verified that my code works as intended and resolves the issue as described
  • I've attached screenshots demonstrating that my code works as intended (if applicable)
  • I've checked all other open PRs to avoid submitting duplicate work
  • I confirm that the code and comments in this PR are not direct unreviewed outputs of AI
  • I confirm that I am the Sole Responsible Author for every line of code, comment, and design decision

…ASP#1945)

The \;version:\1 and \;confidence suffixes are Wappalyzer syntax, not part of the match, so these fingerprints could not match real responses. Strip the suffix from 20 entries (Nginx and the entries with $ before the suffix) and add tests for each.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary by CodeRabbit

  • Bug Fixes
    • Improved web technology detection for several response headers. These matches no longer produce version details when the header value does not provide a reliable version.
    • Refined Shopware header detection while retaining checks for expected token lengths.
    • Reduced false positives for empty or unrelated header values, including cases where a generic server header could otherwise lead to incorrect technology detection.

Walkthrough

Selected web technology header patterns no longer include Wappalyzer version-extraction suffixes. Unit tests check representative header matches, empty and neutral responses, generic Nginx detection, and selected incorrect header values.

Changes

Header fingerprint detection

Layer / File(s) Summary
Remove metadata from header patterns
nettacker/modules/scan/web_technologies.yaml
Selected technology header patterns no longer include version-extraction suffixes. Existing nonempty-value, version-format, optional-version, and Shopware 32-character checks remain.
Test header fingerprint matching
tests/unit/test_web_technologies_scan.py
Tests load the scan template and check representative header matches, empty and neutral responses, Nginx detection, and selected incorrect values.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested labels: bug fixed

Merge Risk: Minimal · up to 27fdf

This change corrects web technology header fingerprints so they match real responses, and it adds tests covering matching and non-matching cases. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: removing leftover Wappalyzer metadata (the \;version / \;confidence suffix) from web_technologies regexes. The raw summary and objectives confirm the YAML edits match …
Description check Passed The description is closely tied to the changeset. It names the file, the 20-line scope, the excluded cases, the test file, and the verification steps. It links issue #1945 and explains that the suffix…
Linked Issues check Passed Issue #1945 asks for removal of the leftover Wappalyzer \;version: and \;confidence: suffix from regexes that cannot match, starting with Nginx, CppCMS, and the entries with $ before the suffix, plus …
Out of Scope Changes check Passed The whole-PR diff changes only nettacker/modules/scan/web_technologies.yaml and adds tests/unit/test_web_technologies_scan.py. Every YAML hunk removes the same Wappalyzer suffix (\;version:\1, \;versi…
Full details: Title check

Explanation

The title names the main change: removing leftover Wappalyzer metadata (the ;version / ;confidence suffix) from web_technologies regexes. The raw summary and objectives confirm the YAML edits match this. It is specific and concise, and it does not describe the 20-line limit or the unverified products, which is acceptable.

Full details: Description check

Explanation

The description is closely tied to the changeset. It names the file, the 20-line scope, the excluded cases, the test file, and the verification steps. It links issue #1945 and explains that the suffix prevents matches. This is well beyond the lenient bar for this check.

Full details: Linked Issues check

Explanation

Issue #1945 asks for removal of the leftover Wappalyzer ;version: and ;confidence: suffix from regexes that cannot match, starting with Nginx, CppCMS, and the entries with $ before the suffix, plus tests. The diff at head 27fdfad (merge base 2f23fab) changes 20 lines in nettacker/modules/scan/web_technologies.yaml. Each change removes only the suffix. It covers the Nginx Server regex (line ~10850), the CppCMS X-Powered-By regex (line ~3956), and 18 other single-line entries with $ before the suffix. The four excluded single-line entries (Botble, CodeIgniter, FancyBox, Inveon) and three multi-line content patterns (Elementor, Gravity Forms, SonarQube) are not changed. The PR gives a reason for each exclusion. The issue's own correction says the four remaining cases need closer review, so deferring them is consistent with the issue. The PR adds tests/unit/test_web_technologies_scan.py (233 tests), which runs the edited entries through TemplateLoader and response_conditions_matched, as the issue requests. Scope note: the PR says it closes #1945, but the issue covers the wider set of about 440 suffix-bearing lines and the author states that later batches remain. The PR should not be read as complete resolution of the whole issue. I did not inspect the test file contents directly; the test results are author-reported.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff changes only nettacker/modules/scan/web_technologies.yaml and adds tests/unit/test_web_technologies_scan.py. Every YAML hunk removes the same Wappalyzer suffix (;version:\1, ;version:6, or ;confidence) from a regex that the PR names. The Shopware hunk keeps the 32-character checks and removes only the suffix. No unrelated entries, module logic, or other files are changed. The test file supports the same objective, so it is in scope. The PR description and the issue both describe this change as detection only, and the diff does not add version reporting.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 2f23fab and 27fdfad.

Files selected for processing: 2

  • nettacker/modules/scan/web_technologies.yaml
  • tests/unit/test_web_technologies_scan.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web_technologies_scan: regexes with leftover Wappalyzer "\;version:" metadata never match (e.g. Nginx, CppCMS)

1 participant