Repository navigation
Conversation
Add file_policy.yml and file_policy_check.py. The check runs at stage2 through permission_check.py and on every Docker image in the image test workflow. Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Package version diffCompares built package versions in legacyPackages between this PR and the tip of the base branch, per system. aarch64-linux: Closure size: 372 -> 372 (2 paths added, 2 paths removed, delta +0, disk usage -13.3KiB).x86_64-linux: Closure size: 370 -> 370 (2 paths added, 2 paths removed, delta +0, disk usage -13.3KiB). |
Remove file_policy_check.py and its callers. The discovery rules move into supascan. Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add `supascan discover` and run it from `validate` when a baselines directory has file-discovery.yml. It reports setuid or setgid files outside an allowlist, world-writable paths other than sticky directories, group-writable paths, owner or group ids with no passwd or group entry, and modes outside an allowlist under the policy roots. Seed file-discovery.yml for the AMI and qemu baselines. Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Move the shared exceptions to audit-specs/baselines/file-discovery.yml and have each build directory include it. Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PostgreSQL Extension Dependency Analysis: PR #2709
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
PostgreSQL Package Dependency Analysis: PR #2709
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
Drop include, per-build policy files, and exception reasons. Use one shared policy that validate finds in the baselines directory or its parent. Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Move the five specs that match in all four build directories up one level. validate looks in the build directory, then its parent. Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Exceptions map a path to the rules it is excused from. Unknown rule names are rejected when the policy loads. Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Drop the context argument, the mode parse helper, and rule name validation. Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
discover replaces itself with sudo -n when not root. The validator calls it directly. Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: MPG-1599 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Adds
supascan discoverand runs it fromsupascan validatewhenfile-discovery.ymlis in the baselines directory or its parent.ansible/playbook.ymlalready runsvalidateat stage2 for AMI and qemu builds, so no playbook change is needed.discoverre-runs itself undersudo -nwhen it is not root.It reports:
/etc,/opt,/data, and/var/lib.Owner, group, and mode of listed paths stay with the goss specs in
audit-specs/baselines. This replaces the earlier standalone Python check.AMI and qemu use
audit-specs/baselines/file-discovery.yml, one shared policy for all four builds. A build directory can override it with its own file.exceptionsmaps a path to the rules it is excused from, so a listed path is still checked against the other rules. Each exception has a comment section:No permissions change in this PR.
The Docker Image Test runs the same check on each of the five images. It exports the built image, extracts it as root, and runs
supascan discover audit-specs/docker/file-discovery.yml --root <dir>. The images are Alpine, so they have their own policy file.The five specs that were identical in all four build directories (
files-postgres-config,files-postgres-data,files-security,files-ssl,kernel-param) move up toaudit-specs/baselines/.validatelooks in the build directory first, then its parent.Testing:
go test ./...passes undernix/packages/supascan.nix build .#checks.aarch64-darwin.supascanpasses. TheTestScansetuid assertion is skipped when the sandbox drops the bit.Not done:
ansible/playbook.ymlpasses an empty$baseline, so the service, user, group, mount, and package specs are skipped. Develop has the same problem. Fixing it is not part of this PR.MPG-1599