Add tests and implement StubBearer authentication for Signer endpoints

- Created SignerEndpointsTests to validate the SignDsse and VerifyReferrers endpoints.
- Implemented StubBearerAuthenticationDefaults and StubBearerAuthenticationHandler for token-based authentication.
- Developed ConcelierExporterClient for managing Trivy DB settings and export operations.
- Added TrivyDbSettingsPageComponent for UI interactions with Trivy DB settings, including form handling and export triggering.
- Implemented styles and HTML structure for Trivy DB settings page.
- Created NotifySmokeCheck tool for validating Redis event streams and Notify deliveries.
This commit is contained in:
master
2025-10-21 09:37:07 +03:00
parent d6cb41dd51
commit 48f3071e2a
298 changed files with 20490 additions and 5751 deletions

View File

@@ -0,0 +1,57 @@
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$repoRoot = Split-Path -Parent $PSScriptRoot
$pluginsDir = Join-Path $repoRoot 'plugins\notify'
$assemblies = @{
slack = 'StellaOps.Notify.Connectors.Slack.dll'
teams = 'StellaOps.Notify.Connectors.Teams.dll'
email = 'StellaOps.Notify.Connectors.Email.dll'
webhook = 'StellaOps.Notify.Connectors.Webhook.dll'
}
$hasFailures = $false
foreach ($channel in $assemblies.Keys) {
$dir = Join-Path $pluginsDir $channel
if (-not (Test-Path -LiteralPath $dir -PathType Container)) {
Write-Host "ERROR: Missing plug-in directory '$dir'."
$hasFailures = $true
continue
}
$manifest = Join-Path $dir 'notify-plugin.json'
$assembly = Join-Path $dir $assemblies[$channel]
$baseName = [System.IO.Path]::GetFileNameWithoutExtension($assemblies[$channel])
$pdb = Join-Path $dir "$baseName.pdb"
$deps = Join-Path $dir "$baseName.deps.json"
if (-not (Test-Path -LiteralPath $manifest -PathType Leaf)) {
Write-Host "ERROR: Missing manifest for '$channel' connector ($manifest)."
$hasFailures = $true
}
if (-not (Test-Path -LiteralPath $assembly -PathType Leaf)) {
Write-Host "ERROR: Missing assembly for '$channel' connector ($assembly)."
$hasFailures = $true
}
Get-ChildItem -LiteralPath $dir -File | ForEach-Object {
switch ($_.Name) {
'notify-plugin.json' { return }
{ $_.Name -eq $assemblies[$channel] } { return }
{ $_.Name -eq "$baseName.pdb" } { return }
{ $_.Name -eq "$baseName.deps.json" } { return }
default {
Write-Host "ERROR: Unexpected file '$($_.Name)' in '$dir'."
$hasFailures = $true
}
}
}
}
if ($hasFailures) {
exit 1
}
exit 0

View File

@@ -0,0 +1,56 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
plugins_dir="${repo_root}/plugins/notify"
declare -A assemblies=(
[slack]="StellaOps.Notify.Connectors.Slack.dll"
[teams]="StellaOps.Notify.Connectors.Teams.dll"
[email]="StellaOps.Notify.Connectors.Email.dll"
[webhook]="StellaOps.Notify.Connectors.Webhook.dll"
)
status=0
for channel in "${!assemblies[@]}"; do
dir="${plugins_dir}/${channel}"
if [[ ! -d "${dir}" ]]; then
echo "ERROR: Missing plug-in directory '${dir}'."
status=1
continue
fi
manifest="${dir}/notify-plugin.json"
assembly="${dir}/${assemblies[$channel]}"
base="${assemblies[$channel]%.dll}"
pdb="${dir}/${base}.pdb"
deps="${dir}/${base}.deps.json"
if [[ ! -f "${manifest}" ]]; then
echo "ERROR: Missing manifest for '${channel}' connector (${manifest})."
status=1
fi
if [[ ! -f "${assembly}" ]]; then
echo "ERROR: Missing assembly for '${channel}' connector (${assembly})."
status=1
fi
while IFS= read -r -d '' file; do
name="$(basename "${file}")"
case "${name}" in
"notify-plugin.json" \
| "${assemblies[$channel]}" \
| "${base}.pdb" \
| "${base}.deps.json")
;;
*)
echo "ERROR: Unexpected file '${name}' in '${dir}'."
status=1
;;
esac
done < <(find "${dir}" -maxdepth 1 -type f -print0)
done
exit "${status}"