Skip to content

Release 3.0.3: run all diagnostic modules from the main entrypoint - #97

Open
netanelcyber wants to merge 2 commits into
release/pypi-3.0.2from
codex/main-all-checks-3.0.3-20261014
Open

netanelcyber wants to merge 2 commits into
release/pypi-3.0.2from
codex/main-all-checks-3.0.3-20261014

Conversation

@netanelcyber

@netanelcyber netanelcyber commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

The main module previously dispatched diagnostic, WinRM and offline commands separately, so --diagnostic-tools all selected only the eight fixed profiles. python -m adpentest --run-all, also spelled --all-options, now selects all 11 fixed diagnostic checks: the eight profiles, WinRM discovery/local identity and KDC diagnostics, local FILE Kerberos cache metadata, and offline LDAP/SPN export analysis. --list-all-checks lists the catalogue and required inputs.

The combined run validates the complete selection before execution, defaults to dry-run, records missing optional inputs as explicit skips, and saves every check under one shared SQLAlchemy/SQLite run ID. JSON, table and HTML output preserve the check statuses. Skips no longer inflate failure counts in ORM history; execution/persistence failures and interruption retain nonzero exit codes and terminal records. Report outputs cannot overwrite selected input/cache/database files.

Normal ticket acquisition, authenticated WinRM checks, legacy scans, history and replay retain their existing standalone entrypoints. Core functionality is preserved; its only change relative to the published 3.0.2 source is the version assignment.

Aligns package/project/core and release tests at 3.0.3, adds docs/MAIN_MODULE.md, updates the README and guides, and moves the guarded PyPI branch trigger to the exact release/pypi-3.0.3 branch.

Validation:

  • 538 tests and 264 subtests passed; 3 optional/platform skips on Linux.
  • Compilation, wheel/sdist builds and strict Twine checks passed.
  • Installed-wheel --all-options, catalogue/help, JSON/HTML output and 11 linked SQLite records passed.
  • Wheel/sdist source bytes verified; all 15 remote changed blobs match the tested local files.
  • GitHub Windows/Linux CI passed for f6208bace31638103911256d5e5d6fd5341cfd43.
  • PyPI 3.0.3 published successfully through GitHub Actions from the same tested commit on release/pypi-3.0.3.
  • Downloaded wheel and source distribution, verified their official SHA-256 digests, and matched all packaged module bytes (including all_checks.py), main routing, ORM storage and regression tests to the tested Git tree. Release-branch Windows/Linux CI also passed.

Active integration tests use mocked transports and synthetic local files; no live AD/KDC was contacted.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T06:14:46.183357Z f6208ba PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: f6208bace3

ℹ️ 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".

Comment thread adpentest/all_checks.py
for name in diagnostics.DIAGNOSTIC_TOOLS:
diagnostics.build_diagnostic_command(name, target, domain=domain, timeout=timeout)
servers = [str(ipaddress.ip_address(server)) for server in (dns_servers or [])]
cache = _file_cache(ticket_cache)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate KRB5CCNAME during preflight

When --ticket-cache is omitted but KRB5CCNAME is set, this validates None and later consumes the environment value only after the eight diagnostics and WinRM check have run. An unsupported cache such as KEYRING:persistent:1000, or a missing/oversized FILE cache, therefore permits active network operations before producing an unsupported/unavailable ticket result, contrary to the whole-run preflight guarantee. Pass the selected environment value through _file_cache here as well.

Useful? React with 👍 / 👎.

Comment thread adpentest/all_checks.py
Comment on lines +230 to +232
if args.html_report:
from .report_generator import generate_html_report
generate_html_report(report, str(Path(args.html_report).expanduser()))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Adapt HTML generation to the combined result schema

For every --html-report combined run, the supplied results record elapsed time as duration_sec, while the existing report template renders duration_s; consequently every diagnostic is displayed as taking 0.00s, including long active operations. Normalize the combined records for the report generator or update the renderer before exposing this output path.

Useful? React with 👍 / 👎.

Comment thread adpentest/all_checks.py
Comment on lines +173 to +174
if len(outputs) != len(set(outputs)) or set(outputs).intersection(inputs):
raise ValueError("Report/database outputs must be distinct from each other and all input files")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Detect hard-linked input and output paths

When an existing report or database path is a hard link to a selected cache, LDAP export, CA file, or another output, the resolved path strings remain different and this check accepts them even though they reference the same inode. Subsequent report writes can therefore overwrite credential/input data, or the HTML write can replace the JSON output, despite the collision guarantee. Compare existing paths with samefile in addition to comparing their resolved names.

Useful? React with 👍 / 👎.

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