Compare commits

...

11 Commits

Author SHA1 Message Date
Chris Farhood f4e8472cb3 fix(CI): replace runners-privilegedescalation with ubuntu-latest
Detect PR Pipeline Type / test-detection-logic (pull_request) Failing after 1s
Detect PR Pipeline Type / detect-pipeline (pull_request) Failing after 2s
PR Validation / validate (pull_request) Failing after 1s
Updates all workflow files and actionlint config to use ubuntu-latest
instead of the deprecated runners-privilegedescalation self-hosted runner.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-20 14:51:46 +00:00
Chris Farhood bc728a753a fix(plugin-release): remove invalid --json flag from gh pr create
The --json flag is not valid for gh pr create, only for read commands
like gh pr list and gh pr view. This was causing the release workflow
to fail with 'unknown flag: --json' in the Create PR step.

The PR number is correctly retrieved on the line after via gh pr list,
so no other change was needed.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-13 12:33:00 +00:00
Chris Farhood ae8086f38b ci-health-check.sh: append infra as private repo after dynamic discovery
Adds 'infra' to PLUGIN_REPOS after the discovery/fallback logic so the
private infra repo is always included in CI/CD health checks regardless
of which path populated PLUGIN_REPOS.

Fixes: PRI-906
Fixes: PRI-488

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-13 12:33:00 +00:00
privilegedescalation-engineer[bot] 1a7770b01f fix: use artifacthub-pkg.yml name for archive-url (PRI-356)
Both the Update artifacthub-pkg.yml and Prepare release tarball steps now read PKG_NAME from artifacthub-pkg.yml when present, falling back to package.json with correct @org/ prefix stripping. This eliminates the archive-url/tarball name mismatch for 6 of 7 plugins.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-13 11:40:15 +00:00
privilegedescalation-cto[bot] 39b4eaf232 Add gitAuthor to shared renovate-config.json
Add gitAuthor to shared renovate-config.json
2026-05-13 03:36:06 +00:00
Chris Farhood 6f995bf6fc Add gitAuthor to shared renovate-config.json
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-13 02:27:27 +00:00
privilegedescalation-ceo[bot] a11d911948 Merge pull request #180 from privilegedescalation/hugh/add-audit-ci-allowlist
chore(ci): add audit-ci config path for allowlist support (PRI-855)
2026-05-12 22:35:46 +00:00
privilegedescalation-engineer[bot] 1c2b97d41d Add lockfile freshness validation to plugin-ci workflow
When pnpm-lock.yaml has overrides section, validate that lockfile is fresh before install. If stale (detected via CONFIG_MISMATCH/EBADLOCKFILE/ERR_PNPM_LOCKFILE), fail with clear error message suggesting 'pnpm install' to regenerate.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-12 22:29:12 +00:00
Chris Farhood d2f1e497ef Revert direct push to main - will create proper PR 2026-05-12 22:00:29 +00:00
Chris Farhood 4f3e3e8d2c Add lockfile freshness validation to plugin-ci workflow
When pnpm-lock.yaml has overrides section, validate that lockfile is fresh
before install. If stale (detected via CONFIG_MISMATCH), fail with clear
error message suggesting 'pnpm install' to regenerate.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-12 21:59:56 +00:00
Chris Farhood 7f027c6ec2 chore(ci): add audit-ci config path for allowlist support
Add --config ./audit-ci.jsonc to audit-ci step so plugin repos can
provide their own allowlist for inherited @kinvolk/headlamp-plugin
dev-dependency CVEs (CTO decision PRI-854).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-06 13:16:51 +00:00
8 changed files with 57 additions and 19 deletions
+1 -2
View File
@@ -1,3 +1,2 @@
self-hosted-runner:
labels:
- runners-privilegedescalation
labels: []
+3
View File
@@ -44,6 +44,9 @@ if [ ${#PLUGIN_REPOS[@]} -eq 0 ]; then
PLUGIN_REPOS=("${PLUGIN_REPOS_FALLBACK[@]}")
fi
# Private repos not visible to dynamic discovery
PLUGIN_REPOS+=("infra")
echo "=== CI/CD Health Check — $(date -u '+%Y-%m-%d %H:%M UTC') ==="
echo ""
+1 -1
View File
@@ -7,7 +7,7 @@ on:
jobs:
health-check:
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
+2 -2
View File
@@ -11,7 +11,7 @@ permissions:
jobs:
test-detection-logic:
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Checkout
@@ -21,7 +21,7 @@ jobs:
run: bash scripts/test-detect-pipeline.sh
detect-pipeline:
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
pipeline-type: ${{ steps.detect.outputs.pipeline-type }}
+31 -3
View File
@@ -11,7 +11,7 @@ on:
jobs:
ci:
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -113,6 +113,34 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-
- name: Validate pnpm lockfile freshness
if: steps.pkg-manager.outputs.manager == 'pnpm'
run: |
if [ ! -f "pnpm-lock.yaml" ]; then
echo "No pnpm-lock.yaml found, skipping lockfile freshness check"
exit 0
fi
if ! grep -q 'overrides:' pnpm-lock.yaml 2>/dev/null; then
echo "No overrides section in pnpm-lock.yaml, skipping lockfile freshness check"
exit 0
fi
echo "Detected pnpm-lock.yaml with overrides section. Checking lockfile freshness..."
ERR_FILE=$(mktemp)
if pnpm install --frozen-lockfile 2>&1 | tee "$ERR_FILE"; then
echo "Lockfile is fresh."
else
if grep -q "CONFIG_MISMATCH\|EBADLOCKFILE\|ERR_PNPM_LOCKFILE" "$ERR_FILE"; then
echo ""
echo "::error::pnpm-lock.yaml is out of sync with package.json overrides."
echo "::error::This typically happens when transitive dependencies change but the lockfile wasn't regenerated."
echo "::error::Run 'pnpm install' to regenerate the lockfile and commit the updated pnpm-lock.yaml."
rm -f "$ERR_FILE"
exit 1
fi
rm -f "$ERR_FILE"
echo "::warning::Install failed with a different error. Will retry in the Install dependencies step."
fi
- name: Install dependencies
run: |
max_attempts=3
@@ -173,7 +201,7 @@ jobs:
- name: Security audit
run: |
if [ "${{ steps.pkg-manager.outputs.manager }}" = "pnpm" ]; then
npx audit-ci --pnpm --audit-level=high
npx audit-ci --pnpm --audit-level=high --config ./audit-ci.jsonc
else
npx audit-ci --npm --audit-level=high
npx audit-ci --npm --audit-level=high --config ./audit-ci.jsonc
fi
+17 -10
View File
@@ -35,7 +35,7 @@ concurrency:
jobs:
check-secrets:
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
outputs:
ready: ${{ steps.check.outputs.ready }}
steps:
@@ -61,7 +61,7 @@ jobs:
check-token-permissions:
needs: check-secrets
if: needs.check-secrets.outputs.ready == 'true'
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
outputs:
has_write: ${{ steps.check.outputs.has_write }}
steps:
@@ -101,7 +101,7 @@ jobs:
check-tag:
needs: check-secrets
if: needs.check-secrets.outputs.ready == 'true'
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check.outputs.skip }}
steps:
@@ -121,7 +121,7 @@ jobs:
release:
needs: [ci, check-tag, check-secrets, check-token-permissions]
if: needs.check-secrets.outputs.ready == 'true' && needs.check-tag.outputs.skip != 'true' && needs.check-token-permissions.outputs.has_write == 'true'
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -208,7 +208,11 @@ jobs:
- name: Update artifacthub-pkg.yml
run: |
VERSION="${{ inputs.version }}"
PKG_NAME=$(jq -r .name package.json | sed 's|^@||' | tr '/' '-')
if [ -f artifacthub-pkg.yml ]; then
PKG_NAME=$(grep '^name:' artifacthub-pkg.yml | cut -d: -f2 | tr -d ' "')
else
PKG_NAME=$(jq -r .name package.json | sed 's|^@[^/]*/||')
fi
RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/v${VERSION}/${PKG_NAME}-${VERSION}.tar.gz"
sed -i "s/^version:.*/version: \"${VERSION}\"/" artifacthub-pkg.yml
sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"${RELEASE_URL}\"|" artifacthub-pkg.yml
@@ -255,9 +259,13 @@ jobs:
- name: Prepare release tarball
run: |
VERSION="${{ inputs.version }}"
# headlamp-plugin strips the @ scope prefix and replaces / with - when naming tarballs.
# e.g. @privilegedescalation/headlamp-argocd-plugin -> privilegedescalation-headlamp-argocd-plugin
PKG_NAME=$(jq -r .name package.json | sed 's|^@||' | tr '/' '-')
# headlamp-plugin strips the @org/ prefix when naming tarballs.
# e.g. @privilegedescalation/headlamp-argocd-plugin -> headlamp-argocd-plugin
if [ -f artifacthub-pkg.yml ]; then
PKG_NAME=$(grep '^name:' artifacthub-pkg.yml | cut -d: -f2 | tr -d ' "')
else
PKG_NAME=$(jq -r .name package.json | sed 's|^@[^/]*/||')
fi
TARBALL="${PKG_NAME}-${VERSION}.tar.gz"
for f in *.tar.gz; do
[ "$f" != "$TARBALL" ] && mv "$f" "$TARBALL"
@@ -346,8 +354,7 @@ jobs:
--title "release: v${VERSION}" \
--body "$BODY" \
--base main \
--head "release/v${VERSION}" \
--json number --jq '.number'
--head "release/v${VERSION}"
# Pull the number again to handle both create and pre-existing cases
OPEN_PR=$(gh pr list --base main --head "release/v${VERSION}" --state open --json number --jq '.[0].number' 2>/dev/null)
else
+1 -1
View File
@@ -6,7 +6,7 @@ on:
jobs:
validate:
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
+1
View File
@@ -1,5 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"gitAuthor": "Renovate Bot <bot@renovateapp.com>",
"extends": ["config:recommended"],
"baseBranches": ["main"],
"schedule": ["every weekend"],