Initialize-SIVulnTargetSql
Prepare a database as the vulnerability close-loop's target
Purpose
Applies the vulnerability target schema (vuln: VulnerabilityItem, VulnerabilityEvent) to a SQL database. Additive and idempotent.
When to run it
Not needed for the Pro database: every update applies these tables before it installs new code, and the install does it as well. Only for a separate SQL target database of the vulnerability close-loop, when Invardia support asks.
Who may run it
| Kind | Role | Scope | Why |
|---|---|---|---|
| other | the SI engine identity (service principal + certificate) with db_ddladmin | the target database | to create the schema objects |
What it changes
| Where | Action | What | Permission / role | Scope | Why | Undo |
|---|---|---|---|---|---|---|
| SQL database | create | schema vuln (VulnerabilityItem, VulnerabilityEvent) | the target database | the close-loop writes here | additive only -- nothing is removed |
What it only reads
- the schema file
Parameters
| Parameter | Required | Default | What it does |
|---|---|---|---|
| -Server | no | [string]$global:SI_VulnSync_SqlServer | |
| -Database | no | [string]$global:SI_VulnSync_SqlDatabase | |
| -AppId | no | [string]$global:SI_SPN_AppId | |
| -TenantId | no | [string]$global:SI_SPN_TenantId | |
| -CertThumbprint | no | [string]$global:SI_SPN_CertThumbprint |
Preview with -WhatIf
Says what it would apply; the database is not opened.
Undo
Additive only: nothing to undo.
Network
It connects to: database.windows.net, invardia.com, login.microsoftonline.com
Download and run
Run these lines in PowerShell: the first downloads the script into the current folder, the second runs it.
Invoke-WebRequest https://invardia.com/support/si/Initialize-SIVulnTargetSql.ps1 -OutFile Initialize-SIVulnTargetSql.ps1
.\Initialize-SIVulnTargetSql.ps1To check the download first, compare its SHA-256 with the published one:
SHA-256 82302f319c79e6897fd4a640119c294a2148bb5d458050ea971d7ab9edb0ec28
Checksums: SHA256SUMS.txt · Version 3.0.79
Before you run it, compare the file's SHA-256 with its line in SHA256SUMS.txt.
Every parameter: Get-Help .\Initialize-SIVulnTargetSql.ps1 -Full · Source: Initialize-SIVulnTargetSql.ps1
Every script, identity and permission for your security review: SecurityInsight