feat: cross-reference existing Network and Data tests into AI pillar#1234
Open
praneeth-0000 wants to merge 5 commits into
Open
feat: cross-reference existing Network and Data tests into AI pillar#1234praneeth-0000 wants to merge 5 commits into
praneeth-0000 wants to merge 5 commits into
Conversation
Routing rules based on how the assessment is invoked: -Pillar AI -> test appears only on AI page -Pillar All -Preview -> test appears on all tagged pages -Pillar All -> AI stripped, test on its original pillar only
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables “cross-referenced” tests to appear under multiple pillars (notably adding existing Network/Data tests into the AI pillar) by allowing multi-pillar metadata in PowerShell and updating the report UI/data model to handle TestPillar as either a string or an array.
Changes:
- Expand report model and UI filtering to support
TestPillarasstring | string[] | null. - Update PowerShell test metadata (
ZtTest.Pillar) and selection/filtering logic to support multi-pillar tests. - Add assessment-result post-processing to restrict multi-pillar
TestPillaroutput based on the requested pillar / preview mode behavior.
Reviewed changes
Copilot reviewed 40 out of 41 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/report/src/config/report-data.ts | Widens TestPillar typing to support multi-pillar arrays in report JSON. |
| src/report/src/components/test-table/data-table.tsx | Updates pillar filtering to match either a scalar pillar or an array of pillars. |
| src/powershell/classes/ZtTest.ps1 | Changes Pillar metadata type to string[] to allow multi-pillar test attribution. |
| src/powershell/public/Get-ZtTest.ps1 | Updates pillar filtering to treat test pillars as potentially multi-valued. |
| src/powershell/private/tests/Invoke-ZtTests.ps1 | Stores requested pillar in session and updates stable-pillar filtering for multi-pillar metadata. |
| src/powershell/private/core/Get-ZtAssessmentResults.ps1 | Post-processes multi-pillar TestPillar results based on requested pillar / preview mode. |
| src/powershell/private/core/Clear-ZtModuleVariable.ps1 | Clears new session variable RequestedPillar between runs. |
| src/powershell/tests/Test-Assessment.25415.ps1 | Tags test as both Network and AI. |
| src/powershell/tests/Test-Assessment.35003.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35004.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35005.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35006.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35007.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35008.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35010.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35011.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35012.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35013.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35014.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35015.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35016.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35017.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35019.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35020.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35021.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35022.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35023.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35024.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35025.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35030.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35032.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35033.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35034.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35035.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35036.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35037.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35038.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35039.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35040.ps1 | Tags test as both Data and AI. |
| src/powershell/tests/Test-Assessment.35041.ps1 | Tags test as both Data and AI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
alexandair
suggested changes
May 24, 2026
Contributor
alexandair
left a comment
There was a problem hiding this comment.
@praneeth-0000 Please, address my feedback.
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.
Cross-reference tests across pillars
Adds support for tests to declare multiple pillars, enabling existing Network and Data tests to surface on the AI pillar page without duplicating test logic.
Problem
The AI pillar assessment previously only showed AI-specific tests. Several existing Network and Data tests are directly relevant to AI security posture (e.g. AI Gateway prompt injection protection, Conditional Access for AI workloads), but had no way to appear on the AI pillar page.
Solution
The
[ZtTest()]attribute'sPillarproperty is changed from[string]to[string[]], allowing a test to declare membership in multiple pillars. Restriction logic inGet-ZtAssessmentResultsthen controls which pillars are visible based on how the assessment was invoked.Behavior
Invoke-ZtAssessment -Pillar All(default, no preview)Cross-referenced tests run and appear on their original pillar pages only. The AI pillar page remains empty.
Invoke-ZtAssessment -Pillar All -PreviewThe AI pillar page now shows both cross-referenced tests (from Network and Data) and AI-only tests. Cross-referenced tests also continue to appear on their original pillar pages.
Network and Data cross-referenced tests on the AI page:
AI-only tests on the AI page:
Invoke-ZtAssessment -Pillar AIOnly the AI pillar runs. Both cross-referenced tests and AI-only tests appear exclusively on the AI pillar page.
Tests cross-referenced to AI
Files changed
PowerShell module
classes/ZtTest.ps1—Pillartype:[string]→[string[]]public/Get-ZtTest.ps1— array-safe pillar filterprivate/tests/Invoke-ZtTests.ps1— array-safe stable-pillar filter; storesRequestedPillarfor post-run restrictionprivate/core/Get-ZtAssessmentResults.ps1— restriction logic: setsTestPillarbased on-Pillarargument and preview flagprivate/core/Clear-ZtModuleVariable.ps1— resetsRequestedPillaron each new assessmenttests/Test-Assessment.25415.ps1—Pillar = ('Network', 'AI')tests/Test-Assessment.350*.ps1(32 files) —Pillar = ('Data', 'AI')React report
src/config/report-data.ts—TestPillar: string | string[] | nullsrc/components/test-table/data-table.tsx—Array.isArraycheck for pillar filtering