Skip to content

feat(modules): add CVE-2024-0012 Palo Alto PAN-OS detection module#1444

Open
hireblackout wants to merge 2 commits intoOWASP:masterfrom
hireblackout:feature/cve-2024-0012-detection
Open

feat(modules): add CVE-2024-0012 Palo Alto PAN-OS detection module#1444
hireblackout wants to merge 2 commits intoOWASP:masterfrom
hireblackout:feature/cve-2024-0012-detection

Conversation

@hireblackout
Copy link
Copy Markdown

@hireblackout hireblackout commented Mar 23, 2026

Proposed change

Adds a new detection module for CVE-2024-0012, a critical authentication bypass vulnerability in Palo Alto Networks PAN-OS software.

The detection logic relies on an Nginx path confusion exploit primitive:

  • Sends an HTTP GET request to /php/ztp_gate.php/.js.map
  • Injects the X-PAN-AUTHCHECK: off header (which the vulnerable Nginx proxy fails to override due to the missing proxy_default.conf include on .js.map URIs)
  • Matches on HTTP 200 AND <title>Zero Touch Provisioning</title> in the response body.

This logic is designed to minimize false positives because patched hosts correctly decline the bypass (returning an HTTP 302 redirect to /php/login.php), and non-target generic web servers are unlikely to contain the PAN-OS-specific ZTP page title.

Type of change

  • New core framework functionality
  • Bugfix (non-breaking change which 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 have 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, I confirm all tests passed locally
  • I've added/updated any relevant documentation in the docs/ folder
  • 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 have attached screenshots demonstrating my code works as intended
  • 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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ad4c914e-2891-4d33-90fc-a13e6af03c1f

📥 Commits

Reviewing files that changed from the base of the PR and between a8f5de4 and 53f36af.

📒 Files selected for processing (5)
  • docs/Modules.md
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
  • pr_body.md
  • tests/modules/__init__.py
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (2)
  • docs/Modules.md
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/modules/test_paloalto_panos_cve_2024_0012.py

Summary by CodeRabbit

  • New Features

    • Added detection for CVE-2024-0012, a critical PAN-OS authentication bypass (CVSS 9.3, CISA KEV).
  • Tests

    • Added tests validating detection behavior for vulnerable, redirected, and non-target responses to ensure correct classification.
  • Documentation

    • Updated modules documentation and PR notes to document the new CVE-2024-0012 detection and expected outcomes.

Walkthrough

Adds a new vulnerability probe for Palo Alto PAN‑OS CVE‑2024‑0012 (HTTP GET to /php/ztp_gate.php/.js.map with X-PAN-AUTHCHECK: off), a YAML module, pytest coverage, a Modules.md entry, and an updated PR body describing detection and non-vulnerable behavior.

Changes

Cohort / File(s) Summary
Vulnerability Module
nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
New YAML module paloalto_panos_cve_2024_0012_vuln with metadata, tags, and one HTTP GET probe (schemas: http/https, ports: 80,443,4443,8443) targeting /php/ztp_gate.php/.js.map with header X-PAN-AUTHCHECK: "off"; match requires status 200 and case-insensitive <title>Zero Touch Provisioning</title> in body.
Tests
tests/modules/test_paloalto_panos_cve_2024_0012.py
New pytest validating positive detection for 200 responses containing the ZTP title and negative cases (302 redirect to /php/login.php?, 404, and 200 responses without the ZTP title).
Documentation & PR
docs/Modules.md, pr_body.md
Added "Vuln Modules" entry for the module in docs/Modules.md and updated pr_body.md describing probe, header, detection criteria, non-vulnerable behavior, and checklist items.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

new module

Suggested reviewers

  • arkid15r
  • securestep9
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the main change: adding a new detection module for CVE-2024-0012 in Palo Alto PAN-OS, which matches the primary objective of the pull request.
Description check ✅ Passed The PR description provides a detailed and relevant explanation of the vulnerability, detection logic, implementation details, and includes a comprehensive checklist, all directly related to the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
tests/modules/test_paloalto_panos_cve_2024_0012.py (1)

10-16: Consider using standard import syntax.

The importlib.import_module approach works but is unconventional. A standard import would be clearer:

from nettacker.core.lib import http

However, this is a minor style preference and the current approach functions correctly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/modules/test_paloalto_panos_cve_2024_0012.py` around lines 10 - 16,
Replace the dynamic import using importlib.import_module with a standard module
import to improve clarity: change the import statement that creates the variable
http via importlib.import_module("nettacker.core.lib.http") to a normal import
such as "from nettacker.core.lib import http" (or "import
nettacker.core.lib.http as http") so references to the http module in this test
file use the conventional import syntax (look for the import line that assigns
to the name http).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@key_gen.config`:
- Line 5: The key_gen.config currently contains a personal relay address under
the Name-Email field; replace the PII by updating the Name-Email entry to a
project/service identity or a CI-injected placeholder (e.g.,
noreply@yourproject.example or ${CI_COMMIT_EMAIL}) so no personal email is
committed, and ensure any documentation or CI that generates this file is
updated to inject the appropriate non-PII value; target the Name-Email setting
in key_gen.config to make this change.
- Around line 6-7: Change the key template to avoid creating an unprotected,
non-expiring private key: replace "Expire-Date: 0" with a bounded expiry (e.g.,
"Expire-Date: 1y" or "Expire-Date: 365d") and remove the "%no-protection"
directive so the generated key is passphrase-protected (or replace it with a
safe protection directive if your tooling requires one). Update the key template
lines referencing "Expire-Date: 0" and "%no-protection" accordingly so the
private key is time-limited and encrypted with a passphrase.

---

Nitpick comments:
In `@tests/modules/test_paloalto_panos_cve_2024_0012.py`:
- Around line 10-16: Replace the dynamic import using importlib.import_module
with a standard module import to improve clarity: change the import statement
that creates the variable http via
importlib.import_module("nettacker.core.lib.http") to a normal import such as
"from nettacker.core.lib import http" (or "import nettacker.core.lib.http as
http") so references to the http module in this test file use the conventional
import syntax (look for the import line that assigns to the name http).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d7ad0811-137b-4c0d-99f8-14a8d64b8cf6

📥 Commits

Reviewing files that changed from the base of the PR and between 74d89e2 and 21b20c2.

📒 Files selected for processing (5)
  • docs/Modules.md
  • key_gen.config
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
  • tests/modules/__init__.py
  • tests/modules/test_paloalto_panos_cve_2024_0012.py

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 21b20c2d3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@hireblackout hireblackout force-pushed the feature/cve-2024-0012-detection branch from 21b20c2 to f3a9910 Compare March 23, 2026 18:47
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pr_body.md`:
- Line 10: Update the phrase "PAN-OS specific" to the compound adjective form
"PAN-OS-specific" in the sentence that currently reads "PAN-OS specific ZTP page
title" so it is hyphenated correctly when used before the noun; locate that
phrase in pr_body.md and replace it with "PAN-OS-specific".
- Line 30: Update the unchecked issue-linking checkbox in pr_body.md by changing
the line "- [ ] I've linked this PR with an open issue" to mark it as completed
("- [x] I've linked this PR with an open issue"); ensure the text still
references issue `#12345` as stated in the PR objectives so the document
accurately reflects the linked issue status.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8887bd63-4320-44a2-926d-51cb9522eb66

📥 Commits

Reviewing files that changed from the base of the PR and between 21b20c2 and f3a9910.

📒 Files selected for processing (6)
  • docs/Modules.md
  • key_gen.config
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
  • pr_body.md
  • tests/modules/__init__.py
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (3)
  • docs/Modules.md
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • key_gen.config

@hireblackout
Copy link
Copy Markdown
Author

Fix: Addressed review feedback by correcting the CVSS score for CVE-2024-0012 from 9.8 to the official 9.3 base score. Commits have been updated.

@hireblackout hireblackout force-pushed the feature/cve-2024-0012-detection branch from f3a9910 to 3107868 Compare March 23, 2026 18:54
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
pr_body.md (2)

30-30: ⚠️ Potential issue | 🟡 Minor

Checklist status conflicts with PR objective.

This box is still unchecked, but the PR states it fixes/links issue #12345; mark it as completed for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pr_body.md` at line 30, Update the PR checklist in pr_body.md to reflect the
stated link to issue `#12345` by changing the unchecked item "[ ] I've linked this
PR with an open issue" to checked "[x] I've linked this PR with an open issue"
so the checklist and the PR description are consistent; ensure the exact
checklist line text is modified to avoid altering other items.

10-10: ⚠️ Potential issue | 🟡 Minor

Hyphenate the compound adjective.

Use PAN-OS-specific instead of PAN-OS specific in this sentence.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pr_body.md` at line 10, Replace the compound adjective "PAN-OS specific" with
the hyphenated form "PAN-OS-specific" in the sentence containing "zero false
positives" (the phrase to update is "PAN-OS specific ZTP page title") so the
text reads "PAN-OS-specific ZTP page title".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@pr_body.md`:
- Line 30: Update the PR checklist in pr_body.md to reflect the stated link to
issue `#12345` by changing the unchecked item "[ ] I've linked this PR with an
open issue" to checked "[x] I've linked this PR with an open issue" so the
checklist and the PR description are consistent; ensure the exact checklist line
text is modified to avoid altering other items.
- Line 10: Replace the compound adjective "PAN-OS specific" with the hyphenated
form "PAN-OS-specific" in the sentence containing "zero false positives" (the
phrase to update is "PAN-OS specific ZTP page title") so the text reads
"PAN-OS-specific ZTP page title".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 493770d8-0be0-4ecb-a359-5ab882040684

📥 Commits

Reviewing files that changed from the base of the PR and between f3a9910 and 3107868.

📒 Files selected for processing (6)
  • docs/Modules.md
  • key_gen.config
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
  • pr_body.md
  • tests/modules/__init__.py
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (3)
  • docs/Modules.md
  • key_gen.config
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/modules/test_paloalto_panos_cve_2024_0012.py

@hireblackout hireblackout force-pushed the feature/cve-2024-0012-detection branch from 3107868 to eb7a369 Compare March 23, 2026 19:03
@hireblackout
Copy link
Copy Markdown
Author

Fix: Addressed all CodeRabbit review feedback. Replaced dynamic imports with standard syntax and corrected PR body typography.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
pr_body.md (1)

30-30: ⚠️ Potential issue | 🟡 Minor

Update the issue-linking checkbox to match the PR objective.

Line 30 is still unchecked, but this PR states it fixes #12345.

📝 Proposed fix
-- [ ] I've linked this PR with an open issue
+- [x] I've linked this PR with an open issue
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pr_body.md` at line 30, Update the issue-linking checkbox in pr_body.md by
changing the line "- [ ] I've linked this PR with an open issue" to a checked
state and include the referenced issue number; for example replace it with "-
[x] I've linked this PR with an open issue (fixes `#12345`)" so the checkbox
matches the PR objective that claims to fix `#12345`.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml`:
- Around line 95-100: The content fingerprint currently uses a broad regex "Zero
Touch Provisioning" which can produce false positives; update the content.regex
in paloalto_panos_cve_2024_0012.yaml to match the full HTML title tag (e.g., a
pattern that anchors the title element like "<title>Zero Touch Provisioning -
PAN[- ]OS" or similar exact title text) so the detection in the content block
targets the full <title>...</title> string rather than any occurrence of the
phrase.

In `@pr_body.md`:
- Around line 25-27: The unsigned commit
eb7a36919b3d3b60a81e212b27ec0c176cb5825c needs to be cryptographically signed;
sign new commits with git commit -S or for existing commits interactively
re-sign by rebasing and amending (e.g., run an interactive rebase and amend each
commit to add a GPG/SSH signature) then force-push the branch so the PR contains
only signed commits and passes the pre-merge policy checks.

---

Duplicate comments:
In `@pr_body.md`:
- Line 30: Update the issue-linking checkbox in pr_body.md by changing the line
"- [ ] I've linked this PR with an open issue" to a checked state and include
the referenced issue number; for example replace it with "- [x] I've linked this
PR with an open issue (fixes `#12345`)" so the checkbox matches the PR objective
that claims to fix `#12345`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5847b544-bfd0-48e4-97d5-c3fe28cd52b4

📥 Commits

Reviewing files that changed from the base of the PR and between 3107868 and eb7a369.

📒 Files selected for processing (6)
  • docs/Modules.md
  • key_gen.config
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
  • pr_body.md
  • tests/modules/__init__.py
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (3)
  • key_gen.config
  • docs/Modules.md
  • tests/modules/test_paloalto_panos_cve_2024_0012.py

@hireblackout hireblackout force-pushed the feature/cve-2024-0012-detection branch from eb7a369 to 13ae27d Compare March 23, 2026 19:17
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml (1)

98-100: ⚠️ Potential issue | 🟠 Major

Tighten the response fingerprint to the full <title> element.

Line 99 uses a broad phrase match, which weakens the “zero false positives” claim. Match the full title tag pattern to keep detection strict.

🔧 Proposed fix
             content:
-              regex: "Zero Touch Provisioning"
+              regex: "(?i)<title>\\s*Zero Touch Provisioning\\s*</title>"
               reverse: false
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml` around lines 98 -
100, The current fingerprint uses the broad regex value "Zero Touch
Provisioning" under the content.regex field which yields false positives;
tighten it to match the full HTML title element by replacing that regex with a
pattern that anchors and captures the entire <title> text (e.g. a regex matching
"<title>Zero Touch Provisioning.*</title>" with appropriate escaping and
case-insensitivity) in the same content.regex setting and keep the same
content.reverse logic unchanged.
pr_body.md (1)

30-30: ⚠️ Potential issue | 🟡 Minor

Update the issue-link checkbox to match the PR objective.

Line 30 is unchecked, but this PR states it fixes #12345. Please mark it as completed.

📝 Proposed fix
-- [ ] I've linked this PR with an open issue
+- [x] I've linked this PR with an open issue
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pr_body.md` at line 30, Update the checklist item "- [ ] I've linked this PR
with an open issue" to checked ("- [x] I've linked this PR with an open issue")
in pr_body.md, and include the issue reference "#12345" nearby (e.g., add "Fixes
`#12345`" or append the issue number next to the checkbox line) so the PR body
clearly reflects that this PR closes that issue; locate the checkbox text string
to make the edit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml`:
- Around line 98-100: The current fingerprint uses the broad regex value "Zero
Touch Provisioning" under the content.regex field which yields false positives;
tighten it to match the full HTML title element by replacing that regex with a
pattern that anchors and captures the entire <title> text (e.g. a regex matching
"<title>Zero Touch Provisioning.*</title>" with appropriate escaping and
case-insensitivity) in the same content.regex setting and keep the same
content.reverse logic unchanged.

In `@pr_body.md`:
- Line 30: Update the checklist item "- [ ] I've linked this PR with an open
issue" to checked ("- [x] I've linked this PR with an open issue") in
pr_body.md, and include the issue reference "#12345" nearby (e.g., add "Fixes
`#12345`" or append the issue number next to the checkbox line) so the PR body
clearly reflects that this PR closes that issue; locate the checkbox text string
to make the edit.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8c7c2e7b-ca6f-41f4-b292-7f21f361f0bc

📥 Commits

Reviewing files that changed from the base of the PR and between eb7a369 and 13ae27d.

📒 Files selected for processing (5)
  • docs/Modules.md
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
  • pr_body.md
  • tests/modules/__init__.py
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (1)
  • docs/Modules.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/modules/test_paloalto_panos_cve_2024_0012.py

@hireblackout hireblackout force-pushed the feature/cve-2024-0012-detection branch from 13ae27d to 96ffa45 Compare March 23, 2026 19:23
@hireblackout
Copy link
Copy Markdown
Author

Fix: Strengthened the detection regex to strictly match the ZTP string within title tags to eliminate potential false positives.

@hireblackout
Copy link
Copy Markdown
Author

@coderabbitai resume

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 23, 2026

✅ Actions performed

Reviews resumed.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pr_body.md`:
- Line 10: Replace the absolute claim "This logic ensures **zero false
positives** because ..." with softened wording that avoids an absolute
guarantee; find the exact sentence starting "This logic ensures **zero false
positives**" in the PR body and change it to something like "This logic
minimizes false positives because patched hosts..." or "This logic is designed
to minimize false positives..." to account for edge cases (mirrored titles,
custom error pages, honeypots) while keeping the explanatory follow-up
unchanged.
- Around line 25-27: The commit 96ffa45 is unsigned and must be GPG-signed
before merging; locate the unsigned commit (96ffa45) on your branch, sign it by
amending or interactively rebasing to apply your GPG signature to that commit
(or all unsigned commits), ensure each amended commit shows as signed, then
force-push the updated branch to this PR so the history contains only GPG-signed
commits as required by the repository policy.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 36eb3f44-087e-4435-aadf-c7a4526e811d

📥 Commits

Reviewing files that changed from the base of the PR and between eb7a369 and 96ffa45.

📒 Files selected for processing (5)
  • docs/Modules.md
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
  • pr_body.md
  • tests/modules/__init__.py
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (3)
  • docs/Modules.md
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml

@hireblackout hireblackout force-pushed the feature/cve-2024-0012-detection branch from 96ffa45 to 71c37ae Compare March 23, 2026 21:09
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
pr_body.md (2)

10-10: ⚠️ Potential issue | 🟡 Minor

Avoid absolute “zero false positives” claim.

Line 10 still uses a hard guarantee. Please soften to “minimizes false positives” to avoid overclaiming in edge environments.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pr_body.md` at line 10, Replace the absolute claim "zero false positives" in
the sentence that explains detection logic with a softened phrase like
"minimizes false positives" (e.g., change "This logic ensures zero false
positives because..." to "This logic minimizes false positives because...") and
update any adjacent wording that implies an absolute guarantee so the sentence
reads conservatively while preserving the explanation about patched hosts
returning a 302 and non-target servers lacking the PAN-OS ZTP page title.

26-26: ⚠️ Potential issue | 🔴 Critical

Commit signature verification failed—unsigned commit must be signed before merge.

The commit 71c37aeaa43f807a913e657225c6215a97e00ff1 is unsigned (signature status: N). Line 26 claims all commits are digitally signed, but the actual commit metadata shows no valid signature. Per OWASP/Nettacker policy, all PR commits must be GPG/SSH signed.

Sign the commit and force-push to resolve:

git commit --amend --no-edit -S
git push origin +HEAD
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pr_body.md` at line 26, The PR claims all commits are signed (pr_body.md line
26) but commit 71c37aeaa43f807a913e657225c6215a97e00ff1 is unsigned; amend that
specific commit to add a GPG/SSH signature (create a signed amend of the commit)
and then force-push the branch so the repository shows the commit as signed
before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pr_body.md`:
- Line 32: The checklist item "- [x] I have attached screenshots demonstrating
my code works as intended" is inconsistent with the PR description stating
screenshots are not attached; either remove the "x" to uncheck that checklist
item in pr_body.md or actually attach the screenshot files to the PR and update
the PR description to reference them so the checked state is correct; locate the
checkbox text in pr_body.md and perform the appropriate action (toggle the
checkbox or upload images and update the text).

---

Duplicate comments:
In `@pr_body.md`:
- Line 10: Replace the absolute claim "zero false positives" in the sentence
that explains detection logic with a softened phrase like "minimizes false
positives" (e.g., change "This logic ensures zero false positives because..." to
"This logic minimizes false positives because...") and update any adjacent
wording that implies an absolute guarantee so the sentence reads conservatively
while preserving the explanation about patched hosts returning a 302 and
non-target servers lacking the PAN-OS ZTP page title.
- Line 26: The PR claims all commits are signed (pr_body.md line 26) but commit
71c37aeaa43f807a913e657225c6215a97e00ff1 is unsigned; amend that specific commit
to add a GPG/SSH signature (create a signed amend of the commit) and then
force-push the branch so the repository shows the commit as signed before
merging.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8637945c-24d7-49f2-888a-39cf1fc2dfa2

📥 Commits

Reviewing files that changed from the base of the PR and between 96ffa45 and 71c37ae.

📒 Files selected for processing (5)
  • docs/Modules.md
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
  • pr_body.md
  • tests/modules/__init__.py
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (2)
  • docs/Modules.md
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/modules/test_paloalto_panos_cve_2024_0012.py

@hireblackout hireblackout force-pushed the feature/cve-2024-0012-detection branch from 71c37ae to a8f5de4 Compare March 23, 2026 21:20
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/modules/test_paloalto_panos_cve_2024_0012.py`:
- Around line 138-152: The test test_200_with_partial_ztp_string_does_not_match
should include a real partial ZTP fragment so the regex non-match is actually
verified; update the response["content"] used in that test to contain a partial
title such as "Zero Touch" (but not the full "Zero Touch Provisioning") and keep
the rest of the HTML unchanged so the assertion verifies the pattern does not
match the partial substring. Ensure you only add the partial string in the
content used by test_200_with_partial_ztp_string_does_not_match so other tests
are unaffected.
- Around line 29-33: The module_step fixture currently only returns the loaded
step; update the test to assert the probe request invariants by loading the step
via module_step(), then verify that step["request"]["path"] equals the expected
probe path used in the YAML and that the header "X-PAN-AUTHCHECK" exists in
step["request"]["headers"] with value "off" (ensure header lookup handles the
same key casing used in the fixture). Use the module_step() helper and
MODULE_PATH reference to locate the code to change and add these assertions
alongside the existing response-matching checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 45da6bcd-cc86-41e3-bc89-7a14b60a400a

📥 Commits

Reviewing files that changed from the base of the PR and between 71c37ae and a8f5de4.

📒 Files selected for processing (5)
  • docs/Modules.md
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
  • pr_body.md
  • tests/modules/__init__.py
  • tests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (1)
  • docs/Modules.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml

@hireblackout hireblackout force-pushed the feature/cve-2024-0012-detection branch from a8f5de4 to 53f36af Compare March 23, 2026 21:33
This commit adds a vulnerability detection module for CVE-2024-0012,
a critical authentication bypass in Palo Alto Networks PAN-OS software.

The module probes the Zero Touch Provisioning (ZTP) endpoint
(/php/ztp_gate.php/.js.map) with the X-PAN-AUTHCHECK: off header
to bypass the Nginx proxy checks on vulnerable versions. It
verifies the bypass by matching the HTTP 200 response and the
'Zero Touch Provisioning' page title, ensuring zero false positives
against patched systems (which return HTTP 302).

Testing:
- Added tests/modules/test_paloalto_panos_cve_2024_0012.py
- Verified against true positive, patched, and non-target mocks
- Passed make pre-commit and make test successfully
- Add probe request invariant assertions to module_step fixture:
  - Verify expected probe path 'php/ztp_gate.php/.js.map' in URL fuzzer
  - Verify X-PAN-AUTHCHECK header is set to 'off' (case-insensitive)
- Update test_200_with_partial_ztp_string_does_not_match:
  - Use real partial ZTP fragment 'Zero Touch' (without 'Provisioning')
  - Actually tests that regex requires full 'Zero Touch Provisioning' string
@hireblackout hireblackout force-pushed the feature/cve-2024-0012-detection branch from c5a98ff to 34bfbac Compare April 6, 2026 23:42
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.

1 participant