Apply security audit remediation and enhance robustness#19
Open
wonkothesan3 wants to merge 1 commit into
Open
Conversation
Security:
- Copy-Local.ps1: re-encoded UTF-8 (was UTF-16), module loader now enforces
the same pinned certificate-thumbprint and signer validation as
Install-ADSK.ps1; -Logging writes Path\_LOG\Copy-Local-<host>.log again
- Trust model: the pinned signer thumbprint is the trust decision. Signature
statuses NotTrusted/UnknownError are accepted when the file hash is intact;
NotSigned/HashMismatch rejected. The certificate is no longer installed
into LocalMachine\Root (BREAKING - no machine-wide trust anchor)
- Module cache folder created with restricted ACL (SYSTEM + Administrators)
as TOCTOU mitigation
Robustness/correctness:
- Install-ADSK.ps1: Copy-WIM/Mount-WIM failures hard-abort the workflow
- Uninstall-Program: msiexec /x {ProductCode} instead of /I (silent repair);
robust UninstallString parsing incl. hyphenated paths and bare executables
- Set-AutodeskUpdate: writes real user's hive via SID, validates parameters
- Set-AutodeskDeployment: honors WhatIf/ShouldProcess for -Remove and save
- Copy-WIM: stale local WIM detection (size + timestamp)
- Get-AppLogError: server-side event log filtering (-FilterHashtable)
- Get-RealUserName: single return value, cross-platform username fallback
- Install-AutodeskDeployment: quoted config path, waits on the started
process instead of any process named Installer; log filename typo fixed
CI:
- New test job (Pester + PSScriptAnalyzer, windows-latest) gates PRs, pushes
and the release job
- Version stamping regex overload fixed (static Replace's 4th arg is
RegexOptions, not a count)
Tests/docs:
- Install-ADSK.Tests.ps1 17/17 cross-platform; new coverage for pinned
NotTrusted acceptance and HashMismatch rejection
- CHANGELOG [Unreleased] + readme trust-model documentation
- .gitignore hardened (env/credential/key patterns, _LOG/, local settings,
editor workspace files)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJHN3XED51RYjWEGt9Pin8
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.
Implement security enhancements including a new trust model for certificate validation, ensuring only trusted signatures are accepted. Improve robustness by addressing failure handling in installation scripts and refining uninstall processes. Introduce CI tests to enforce code quality and maintainability. Update documentation to reflect changes and enhance clarity on the trust model.