Security hardening 2026 07 - #2
Merged
Merged
Conversation
RLS gate now aborts (500) when the tenant id cannot be installed instead of running the request with global visibility. Strict gate resolves the target org with the caller's RLS scope removed so cross-tenant objects are actually visible, and defaults to deny when a covered resource's org cannot be determined.
- Superuser / system_administrator / system_auditor grants from the source are now gated behind an explicit --grant-superusers opt-in and logged loudly; without it they are skipped, not silently applied. - Custom credential-type injectors are no longer imported verbatim; they are dropped for an admin to re-approve unless --trust-injectors is given. - Secrets are read from AWX_TOKEN / AWX_PASSWORD env vars in preference to argv, with a warning when passed on the command line. - Warn when --insecure disables TLS verification while credentials flow.
get_or_create dropped the supplied admin_password on an existing username and attached that (possibly other-tenant) account to the new org. Refuse unless attach_existing_admin is explicitly set.
A JobTemplate's playbook field is user-editable; an absolute or ../ value let the scanner run against arbitrary host paths. realpath and confine the target to the project checkout.
…model - EventLog carries its own organization_id but had no RLS policy; add it to the covered set with an idempotent migration (0209). - Document that Project/WJT/Schedule/nodes are covered indirectly via their main_unifiedjobtemplate parent (org column was moved there in 0109), and that NULL organization_id is intentionally global — don't list always-owned tables that permit NULL. - Document the required TENANCY_* enablement set for multi-tenant installs.
Associating an SSO login to an existing local account by matching email enables cross-IdP account takeover when an IdP does not verify email ownership. Associate by provider UID instead.
- Rate limiter no longer swallows Redis outages at debug level; logs loudly and honours TENANCY_RATE_LIMIT_FAIL_CLOSED (default open for availability). - RLS policies use NULLIF(current_setting(...),'')::int so the empty 'no scope' sentinel can't raise on the ::int cast (migration 0210). - pip-audit adapter rejects ../ or absolute requirements overrides.
Migration 0205 declares a NOT NULL description column on TenantQuotaEvent and TenantIsolationEvent, but both models extend CreatedModifiedModel which doesn't provide it, so every insert raised IntegrityError. Surfaced once the strict isolation gate actually started blocking and tried to write its audit event. Matches the migration state, so no new migration is needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
Changes
Testing
Notes for reviewers
Checklist
## [Unreleased])