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
| $uri = 'https://YOUR-VECTR-HOST/sra-purpletools-rest/graphql' | |
| $headers = @{ | |
| Authorization = 'VEC1 YOUR_API_KEY_ID:YOUR_API_KEY_SECRET' | |
| } | |
| $query = @' | |
| query ListOutcomes { | |
| outcomes { | |
| id |
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
| e7cd9332bebe1d9f7a142a25a68d0e22 |
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
| #requires -Version 5.1 | |
| Set-StrictMode -Version 2.0 | |
| $ErrorActionPreference = 'Stop' | |
| function Get-Value { | |
| param($Object, [string] $Name, $Default = $null) | |
| if ($null -eq $Object) { return $Default } | |
| if ($Object -is [Collections.IDictionary]) { | |
| if ($Object.Contains($Name) -and $null -ne $Object[$Name]) { return $Object[$Name] } | |
| return $Default |
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
| #requires -Version 5.1 | |
| Set-StrictMode -Version 2.0 | |
| $ErrorActionPreference = 'Stop' | |
| function Get-Value { | |
| param($Object, [string] $Name, $Default = $null) | |
| if ($null -eq $Object) { return $Default } | |
| if ($Object -is [Collections.IDictionary]) { | |
| if ($Object.Contains($Name) -and $null -ne $Object[$Name]) { return $Object[$Name] } | |
| return $Default |
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
| #requires -Version 5.1 | |
| Set-StrictMode -Version 2.0 | |
| $ErrorActionPreference = 'Stop' | |
| function Get-Value { | |
| param($Object, [string] $Name, $Default = $null) | |
| if ($null -eq $Object) { return $Default } | |
| if ($Object -is [Collections.IDictionary]) { | |
| if ($Object.Contains($Name) -and $null -ne $Object[$Name]) { return $Object[$Name] } | |
| return $Default |
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
| #requires -Version 5.1 | |
| <# | |
| .SYNOPSIS | |
| Creates Jira Data Center issues for scenarios in completed Cymulate assessments, then applies configured enrichment. | |
| .EXAMPLE | |
| .\Sync-CymulateToJira.ps1 -ConfigPath .\config.jira.json -RunDate '2026-09-17' -DryRun -Verbose | |
| .EXAMPLE | |
| .\Sync-CymulateToJira.ps1 -StartDate '2026-09-01' -EndDate '2026-09-17' -WhatIf | |
| .EXAMPLE | |
| .\Sync-CymulateToJira.ps1 -StartDate '2026-09-20' -EndDate '2026-09-27' -DryRun -DiagnosticLogPath .\jira-diagnostic.log -Verbose |
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
| #requires -Version 5.1 | |
| Set-StrictMode -Version 2.0 | |
| $ErrorActionPreference = 'Stop' | |
| function Get-Value { | |
| param($Object, [string] $Name, $Default = $null) | |
| if ($null -eq $Object) { return $Default } | |
| if ($Object -is [Collections.IDictionary]) { | |
| if ($Object.Contains($Name) -and $null -ne $Object[$Name]) { return $Object[$Name] } | |
| return $Default |
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
| $config = Get-Content .\config.jira.json -Raw | ConvertFrom-Json | |
| $jiraBase = $config.Jira.BaseUrl.TrimEnd('/') | |
| $pat = [Net.NetworkCredential]::new( | |
| '', | |
| (Read-Host 'Paste the raw Jira PAT' -AsSecureString) | |
| ).Password.Trim() | |
| if ([string]::IsNullOrWhiteSpace($pat)) { | |
| throw 'No token entered.' |
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
| #!/usr/bin/env python3 | |
| """Build a Jira v2 create-issue JSON body from createmeta. | |
| Reads classic createmeta or /issue/createmeta/{project}/issuetypes/{id}. | |
| Prints a usable POST /rest/api/2/issue payload to STDOUT. | |
| Prints field id, required flag, and datatype to STDERR. | |
| Usage: | |
| python3 createmeta_to_payload.py createmeta.json | |
| python3 createmeta_to_payload.py < createmeta.json |
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
| #!/usr/bin/env python3 | |
| """Create a Jira issue with v2 API, then update it with extra custom fields. | |
| HTTP transport matches the ssl + urllib3.PoolManager approach used internally. | |
| """ | |
| from __future__ import annotations | |
| import json | |
| import ssl |
NewerOlder