Skip to content

Prepare 3.1.1 security hotfix - #954

Merged
Ian Hellen (ianhelle) merged 2 commits into
mainfrom
fix/security-hotfix-3.1.1
Oct 15, 2026
Merged

Ian Hellen (ianhelle) merged 2 commits into
mainfrom
fix/security-hotfix-3.1.1

Conversation

@ianhelle

@ianhelle Ian Hellen (ianhelle) commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Prepare the 3.1.1 security hotfix without deprecating the Mordor driver.

  • Escape provider-controlled TI browser headings, nested/scalar details, raw responses and reference text. Only absolute HTTP/HTTPS references become clickable links.
  • Replace the two remaining MITRE pickle caches with table-oriented JSON. Legacy pickle caches are never read or migrated; invalid JSON caches are logged and refreshed. Preserve text-column dtypes, indices and null values, and support connections with disk caching disabled.
  • Keep python-publish.yml, but disable both jobs with unconditional false guards. Separate build and publish, remove static PyPI token use, use OIDC with a pypi environment, retain full action SHA pins, reduce permissions and restrict future execution to non-prerelease v* releases.
  • Replace the repository-owned MITRE test fixtures with JSON and update injected cache preparation in both GitHub Actions and Azure Pipelines, including refreshing metadata timestamps.
  • Update directly related documentation and bump the patch version from 3.1.0 to 3.1.1.
  • Pin Pylint to 4.0.9, the last passing main CI version, in dev dependencies and pre-commit so new lint checks are adopted deliberately rather than introduced by an unconstrained CI upgrade.

Investigation

The workflow's mutable-tag reports were already addressed by previous SHA-pinning changes. Mordor commit 2bca6952 replaced the metadata pickle cache, but left the techniques/tactics pickle caches. Remote metadata and normal dataset downloads use known HTTPS sources; the remaining deserialization risk was an attacker replacing locally writable pickle caches, not an established remote-code-execution route through the upstream datasets.

Validation

  • Focused TI browser, Mordor driver and notebook widget tests: 76 passed, 3 skipped. Existing network/notebook skip behavior is preserved.
  • JSON cache round-trip, stale/corrupt/schema-invalid cache refresh, legacy-pickle avoidance, uncached connections and HTML/link injection regression coverage.
  • Executed both CI cache preparation scripts with network access blocked: each loaded 695 techniques, 14 tactics and 96 datasets from the injected fixtures.
  • YAML, JSON and whitespace pre-commit hooks passed for changed files; scoped Ruff lint/format checks, pylint and pydocstyle passed.
  • The exact whole-package CI Pylint command passed with Pylint 4.0.9 / Astroid 4.0.4. The previous failed PR run had installed Pylint 4.1.3 / Astroid 4.3.4.
  • Full mypy passed for all 273 source files using --python-version 3.13, matching the installed interpreter. The default 3.10 target cannot parse the installed NumPy stubs; no repository type-check configuration was changed.
  • Verified packaging and runtime version 3.1.1.

Publishing configuration

This PR disables execution in YAML; it does not change GitHub repository settings or configure PyPI. Before deliberately re-enabling publishing, configure the protected pypi environment with required approval and release-tag restrictions, and register the matching PyPI trusted publisher. The legacy PYPI_API_TOKEN is no longer referenced by this workflow.

Ian Hellen (ianhelle) and others added 2 commits October 14, 2026 18:10
Escape TI provider HTML and restrict reference links; replace Mordor MITRE pickle caches and CI fixtures with JSON; isolate and disable OIDC publishing; bump the patch version to 3.1.1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0a90b0-e734-4e50-a13c-ff55a9aa0b48
Align CI dev dependencies and pre-commit on Pylint 4.0.9 so adoption of new lint checks is explicit rather than driven by an unconstrained install.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0a90b0-e734-4e50-a13c-ff55a9aa0b48
@ianhelle
Ian Hellen (ianhelle) merged commit cbeeaca into main Oct 15, 2026
12 checks passed
@ianhelle
Ian Hellen (ianhelle) deleted the fix/security-hotfix-3.1.1 branch October 15, 2026 02:00
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