Skip to content

Apply security audit remediation and enhance robustness#19

Open
wonkothesan3 wants to merge 1 commit into
CIDEON-EC:mainfrom
wonkothesan3:main
Open

Apply security audit remediation and enhance robustness#19
wonkothesan3 wants to merge 1 commit into
CIDEON-EC:mainfrom
wonkothesan3:main

Conversation

@wonkothesan3

Copy link
Copy Markdown

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.

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
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