Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fea3b06
feat: add user-defined NetworkNeighborhood support
entlein Mar 13, 2026
773b617
fork-only: k8sstormcenter CI/workflow customizations
entlein Mar 13, 2026
36ca7e9
pre-awp
entlein Mar 13, 2026
56eed19
Feat/signature verification with component tests (#21)
entlein Mar 14, 2026
c2d681e
Feat/tamperalert (#22)
entlein Mar 15, 2026
3077029
we lost files during rebase and cherry pick
entlein Mar 15, 2026
99b1bf4
merge conflicts
entlein Apr 26, 2026
7948db7
Update go.mod
entlein Apr 26, 2026
37ce9d6
Merge remote-tracking branch 'upstream/main'
entlein Apr 27, 2026
d2f2c5a
ci: build image once with consistent deps + sync go.sum (#30)
entlein Apr 27, 2026
2cd98c3
tests(component): rename to Related{Kind,Name,Namespace}MetadataKey (…
entlein Apr 27, 2026
aa2e3ff
Update benchmark.yaml
entlein Apr 27, 2026
ce90f5f
ci(benchmark): query upstream releases for the baseline image (#33)
entlein Apr 27, 2026
81c2f1f
deps(storage): bump to fork fix/endpoint-wildcard-port-overbroaden (0…
entlein Apr 29, 2026
f0d0f72
merge upstream/main: replace AP+NN cache with unified ContainerProfil…
entlein May 2, 2026
f4f7914
ci: pin all GitHub Actions to immutable SHAs (Scorecard Pinned-Depend…
entlein May 5, 2026
83bc87a
ci: add explicit top-level permissions to all workflows (least privil…
entlein May 6, 2026
a3fdc33
Merge/exec arg wildcards (#38)
entlein May 10, 2026
58247d7
merge: upstream/main + recover wildcards/signing on projection-v1 (#43)
entlein May 16, 2026
3dd5932
open: narrower-fallback Patterns scan for suffix/prefix queries (All=…
May 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,30 @@ on:
required: false
type: string


concurrency:
group: benchmark-${{ github.ref }}
cancel-in-progress: true

jobs:
benchmark:
runs-on: ubuntu-large
runs-on: ubuntu-latest
# Override read-all to keep the 'Comment on PR' step working — the
# peter-evans/create-or-update-comment action requires both
# issues:write and pull-requests:write to post benchmark results.
# CodeRabbit PR #39 finding (benchmark.yaml:29).
permissions:
contents: read
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: "1.25"

Expand All @@ -57,10 +66,13 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
# Baseline = latest UPSTREAM release. Our fork doesn't tag releases,
# so querying ${{ github.repository }} gives 404. Comparing against
# upstream is also the meaningful baseline for performance work.
if [[ -n "${{ inputs.before_image }}" ]]; then
echo "BEFORE_IMAGE=${{ inputs.before_image }}" >> "$GITHUB_OUTPUT"
else
LATEST_TAG=$(gh api repos/${{ github.repository }}/releases/latest --jq '.tag_name')
LATEST_TAG=$(gh api repos/kubescape/node-agent/releases/latest --jq '.tag_name')
echo "BEFORE_IMAGE=quay.io/kubescape/node-agent:${LATEST_TAG}" >> "$GITHUB_OUTPUT"
fi

Expand Down Expand Up @@ -94,7 +106,7 @@ jobs:
echo "After image will be loaded by dedup-bench.sh"

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: '3.12'

Expand Down Expand Up @@ -125,7 +137,7 @@ jobs:
"${{ github.workspace }}/benchmark-output/after"

- name: Comment on PR
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
if: github.event_name == 'pull_request' && always()
continue-on-error: true
with:
Expand All @@ -134,7 +146,7 @@ jobs:
comment-tag: benchmark-results

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: benchmark-results
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: build-image

on:
workflow_dispatch:
inputs:
IMAGE_TAG:
required: true
type: string
description: "Image tag for the node-agent image"
STORAGE_REF:
required: false
type: string
default: ""
description: "Branch/tag/commit of k8sstormcenter/storage to use (leave empty to keep go.mod default)"
PLATFORMS:
type: boolean
required: false
default: false
description: "Build for both amd64 and arm64"

# Default to read-only at the workflow level (least privilege per Scorecard).
# Jobs that need elevated scopes override below.
permissions: read-all

jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
contents: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: recursive

- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: "1.25"

- name: Update storage dependency
if: ${{ inputs.STORAGE_REF != '' }}
env:
STORAGE_REF: ${{ inputs.STORAGE_REF }}
GONOSUMCHECK: "*"
GOFLAGS: ""
run: |
echo "Replacing github.com/kubescape/storage with github.com/k8sstormcenter/storage@${STORAGE_REF}"
go mod edit -replace "github.com/kubescape/storage=github.com/k8sstormcenter/storage@${STORAGE_REF}"
go mod tidy
echo "Resolved storage version:"
grep "k8sstormcenter/storage" go.sum | head -1

- name: Ensure ig is installed
run: |
curl -L https://github.com/inspektor-gadget/inspektor-gadget/releases/download/v0.45.0/ig_0.45.0_amd64.deb -O
sudo dpkg -i ig_0.45.0_amd64.deb

- name: Build gadgets
run: make gadgets

- name: Set up QEMU
if: ${{ inputs.PLATFORMS }}
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3

- name: Login to GitHub Container Registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
file: build/Dockerfile
tags: ghcr.io/${{ github.repository_owner }}/node-agent:${{ inputs.IMAGE_TAG }}
build-args: image_version=${{ inputs.IMAGE_TAG }}
platforms: ${{ inputs.PLATFORMS && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true


trigger-component-tests:
needs: build
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Trigger component tests
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
STORAGE_TAG="${{ inputs.IMAGE_TAG }}"
NODE_AGENT_TAG="${{ inputs.IMAGE_TAG }}"
STORAGE_REF="${{ inputs.STORAGE_REF }}"
echo "Triggering component tests with STORAGE_TAG=${STORAGE_TAG} NODE_AGENT_TAG=${NODE_AGENT_TAG} STORAGE_REF=${STORAGE_REF}"
gh workflow run component-tests.yaml \
--repo "${{ github.repository }}" \
--ref "${{ github.ref_name }}" \
-f STORAGE_TAG="${STORAGE_TAG}" \
-f NODE_AGENT_TAG="${NODE_AGENT_TAG}" \
-f STORAGE_REF="${STORAGE_REF}"
15 changes: 13 additions & 2 deletions .github/workflows/bypass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: build
on:
workflow_dispatch:

# Default to read-only at the workflow level (least privilege per Scorecard).
# Jobs that need elevated scopes override below.
permissions: read-all

jobs:
reset-run-number:
runs-on: ubuntu-latest
Expand All @@ -11,16 +15,23 @@ jobs:
steps:
- name: Get build number
id: get-build
uses: mlilback/build-number@v1
uses: mlilback/build-number@81a5eb0abae9b77d036138284ba1094d49acbc32 # v1
with:
base: 254
run-id: ${{ github.run_number }}

pr-merged:
needs: reset-run-number
# Scopes the reusable workflow's docker-build / create-release jobs need.
# Mirrors pr-merged.yaml's pr-merged job — required because the top-level
# 'permissions: read-all' caps what the called workflow can request.
permissions:
id-token: write
packages: write
contents: write
uses: ./.github/workflows/incluster-comp-pr-merged.yaml
with:
IMAGE_NAME: quay.io/${{ github.repository_owner }}/node-agent
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/node-agent
IMAGE_TAG: v0.2.${{ needs.reset-run-number.outputs.run-number }}
COMPONENT_NAME: nodeAgent
CGO_ENABLED: 0
Expand Down
Loading
Loading