Bringing DEV to the new report works - #1460
Closed
Anton Staykov (astaykov) wants to merge 62 commits into
Closed
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ving test output formatting
… the logic for future use.
Fix #1422 This pull request introduces a comprehensive overhaul of error sanitization for PowerShell test diagnostics to prevent sensitive credential data from being persisted in logs, reports, or error records. The main improvements include a new defense-in-depth sanitization function, safe error record/message generation, and updated error formatting and logging logic to ensure only allow-listed diagnostic fields are exposed. Extensive tests are added to validate these protections. **Error sanitization and redaction:** * Added `Protect-ZtReportText` function to redact credential-bearing HTTP headers and sensitive values from report content before persistence, and integrated it into `Add-ZtTestResultDetail`. * Updated test result persistence and logging to always sanitize error details, including at the TestResult persistence boundary and in optional test logs. **Safe error record and message generation:** * Introduced `New-ZtSafeErrorRecord` to create sanitized error records with only allow-listed diagnostic fields and without unsafe TargetObject data. This prevents request/response objects containing bearer tokens from being retained in test statistics or passed into logging. * Added `Get-ZtSafeErrorMessage` to extract safe, structured diagnostic summaries (request method/path, HTTP status, Graph error code, and correlation IDs) from error records, omitting unstructured exception messages, headers, and response bodies. **Error formatting and reporting:** * Implemented `Format-ZtTestErrorDetail` to generate markdown-formatted error summaries using only sanitized fields for failed tests. It adds bounded metadata such as exception type, error ID, HTTP status, and source location. * Refactored error handling in `Invoke-ZtTest.ps1` and `Write-ZtTestError.ps1` to use the new safe error record/message pipeline, ensuring all error reporting is sanitized and consistent. **Testing:** * Added `ErrorSanitization.Tests.ps1` with comprehensive tests to verify that credentials and sensitive values are never persisted in logs or reports, and that only safe diagnostic information is exposed.
…bal Secure Access (#1436)
… in Microsoft Sentinel
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… in Microsoft Sentinel (#1445)
…ice 365 are configured with impersonation and spoof protection (#1397)
…o block malicious messages, links, and attachments (#1398)
…utbound, and availability defense planes (#1442)
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.
No description provided.