Nettacker icon indicating copy to clipboard operation
Nettacker copied to clipboard

Module for Jenkins version scanning

Open Aarush289 opened this issue 5 months ago • 1 comments

Proposed change

Your PR description goes here: Add Jenkins version scanning module to extract version of Jenkins from HTTP responses. Fixes #1598 Tested on local instance using docker image

Type of change

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

Checklist

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

Aarush289 avatar Jun 23 '26 16:06 Aarush289

Review Change Stack

Summary by CodeRabbit

  • New Features

    • Added Jenkins version detection scanning. The module identifies Jenkins automation server installations and extracts version information through HTTP requests across standard web ports, detecting specific response headers and HTTP status codes.
  • Documentation

    • Updated module documentation to include the new Jenkins scanning capability.

Walkthrough

A new jenkins_version_scan module is added as nettacker/modules/scan/jenkins_version.yaml, defining metadata, HTTP GET payload targeting common web ports, and response matching on status 200/403 plus an X-Jenkins header version regex. The module is also listed in docs/Modules.md.

Jenkins Version Scan Module

Layer / File(s) Summary
Module metadata, payload, and detection logic
nettacker/modules/scan/jenkins_version.yaml, docs/Modules.md
Defines the jenkins_version_scan module with name, author, severity, description, reference URLs, and active profiles (scan, http, jenkins, info_severity). The HTTP payload issues a GET request to ${schema}://${target}:${ports}/ over ports 80, 443, 8080, and 8443 with SSL disabled. Matching requires HTTP status 200 or 403 and an X-Jenkins header matching a semantic version regex; the header value is logged. The module is also registered as a bullet entry in the Scan Modules list in docs/Modules.md.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change—a new module for Jenkins version scanning that is directly reflected in the added YAML configuration file.
Description check ✅ Passed The description clearly relates to the changeset by stating the purpose of adding a Jenkins version scanning module and references the linked issue #1598.
Linked Issues check ✅ Passed The PR implements the requirement from issue #1598 by introducing the jenkins_version_scan module that detects Jenkins servers and extracts version information from HTTP responses.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue—a new module configuration file and documentation update for Jenkins version scanning functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

coderabbitai[bot] avatar Jun 23 '26 16:06 coderabbitai[bot]

Thank you for your contribution @Aarush289 🚀 !

securestep9 avatar Jun 25 '26 06:06 securestep9