Skip to content

Audit fixes (2026-11-18) - #1

Merged
NullSpace-BitCradle merged 9 commits into
mainfrom
fix/audit-2026-11-18
Nov 18, 2026
Merged

NullSpace-BitCradle merged 9 commits into
mainfrom
fix/audit-2026-11-18

Conversation

@NullSpace-BitCradle

Copy link
Copy Markdown
Owner

Fixes from a code audit on 2026-11-18.

Changes

  • Stop silent data loss and take paths on the command line
  • Harden the Tenable.io downloader
  • Add a pytest suite and CI
  • Bring the README in line with the code
  • Pin CI actions to commit SHAs
  • Never drop distinct findings on SQL import
  • Downloader: handle gzip responses and long exports
  • Document import idempotency, permissions and old-table widths

Notes

Tests: 128 pytest pass. The SQL import now dedupes through an import log instead of IGNORE_DUP_KEY, so distinct findings that share host/plugin/port are kept. Not yet run against a real SQL Server or Tenable.io. Land together with the Tenable_Scan_Field_Reference PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi

NullSpace-BitCradle and others added 9 commits November 18, 2026 13:09
Shared nessus_common.py holds the one 106-column spec and a streaming parser.
Repeated CWE/BID values are kept, over-long XLSX cells are truncated with a
visible note, every host reaches the SQL path, and formula-leading cells are
neutralised. The converters accept file paths and only fall back to the
picker when none are given, so they run unattended. nessus_to_sql.py now
creates tables as the README says, validates existing ones, escapes
identifiers and values, keeps TLS validation on, and runs one transaction
per file with --dry-run to preview.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi
Timeouts on every call, credentials from getpass or environment variables,
safe output names, 429 retry, failed-export detection, partial-download
check, and --all/--scan-id/--output-dir. No work runs at import time.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi
111 tests built on synthetic .nessus files and fake SQL and HTTP layers.
The workflow runs them on every push and pull request.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi
Document command-line use, exit codes, the SQL options and their limits,
and bound dependency versions. Replace the old example server address.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi
The unique index with IGNORE_DUP_KEY keyed on six columns, coarser than the
106-column dedupe, so distinct compliance results and hosts without a
host-ip collapsed to one row with only a server warning. Remove it and make
re-imports idempotent per file instead: a <table>_import_log keyed by file
name and SHA-256, written in the same transaction, with logged files
skipped. The summary now reports rows inserted, not rows sent, and existing
tables with columns too narrow for joined CWE/BID/MSKB values get a warning
with the ALTER statements to run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi
Skip the Content-Length size check when the response is content-encoded,
tolerate a non-numeric Content-Length, and make the export wait
configurable (--export-timeout, default 900 s; --poll-interval).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi
Ubuntu 26.04 runners have no Python 3.9 build, so setup-python failed and
fail-fast cancelled every other job. 3.9 stays covered on windows-latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi
@NullSpace-BitCradle
NullSpace-BitCradle merged commit f7bf985 into main Nov 18, 2026
6 checks passed
@NullSpace-BitCradle
NullSpace-BitCradle deleted the fix/audit-2026-11-18 branch November 19, 2026 00:32
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