Index of every page on this site: llms.txt
All skills
openshift avatar

/konflux-ec-violations

@0f43b29 official
by openshiftopenshift/hypershift555 stars
592
Run it yourself

Accesses archived Konflux PipelineRuns, TaskRuns, and pod logs via KubeArchive. Auto-applies when checking Konflux PipelineRun results, investigating enterprise contract failures, or retrieving logs from completed Konflux CI runs.

  • 1 file
  • 5.1 KB
  • Updated 5 days ago
  • GitHub
Use this Skill: https://skilld.dev/gh/openshift/hypershift/konflux-ec-violations

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈63 tokens for metadata: the name and description. ≈1.2k when used: this file.

Description uses 3.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈262 characters, or 3.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Konflux Archived PipelineRun Access

This skill provides the workflow for accessing Konflux PipelineRuns that have been archived by the kube archiver. PipelineRuns are archived quickly after completion and are typically NOT available via oc get. Use the KubeArchive REST API to retrieve PipelineRun details, TaskRun results, and pod logs.

When to Use This Skill

This skill automatically applies when:

  • Checking results of any completed Konflux PipelineRun
  • Investigating Konflux enterprise contract check failures
  • Retrieving logs from finished Konflux CI builds or tests
  • Analyzing trusted task violations in CI
  • Looking at Konflux check results on GitHub PRs
  • A PipelineRun is not found via oc get in the Konflux namespace

Architecture

Konflux CI on HyperShift

  • Namespace: crt-redhat-acm-tenant
  • Cluster: api.stone-prd-rh01.pg1f.p1.openshiftapps.com:6443
  • PipelineRuns are archived quickly by kube archiver and are typically NOT available via oc get

KubeArchive

Archived PipelineRuns, TaskRuns, pods, and pod logs are accessible through the KubeArchive REST API:

KA_HOST="https://kubearchive-api-server-product-kubearchive.apps.stone-prd-rh01.pg1f.p1.openshiftapps.com"

Authentication uses the oc token:

curl -s -H "Authorization: Bearer $(oc whoami -t)" "${KA_HOST}/livez"

Accessing Archived Resources

Fetch an Archived PipelineRun

curl -s -H "Authorization: Bearer $(oc whoami -t)" \
  "${KA_HOST}/apis/tekton.dev/v1/namespaces/crt-redhat-acm-tenant/pipelineruns/<PIPELINERUN_NAME>"

Child TaskRun references are in status.childReferences:

data['status']['childReferences']  # list of {name, kind, apiVersion, pipelineTaskName}

Fetch an Archived TaskRun

curl -s -H "Authorization: Bearer $(oc whoami -t)" \
  "${KA_HOST}/apis/tekton.dev/v1/namespaces/crt-redhat-acm-tenant/taskruns/<TASKRUN_NAME>"

TaskRun results are in status.results.

Find Pods for a TaskRun

curl -s -H "Authorization: Bearer $(oc whoami -t)" \
  "${KA_HOST}/api/v1/namespaces/crt-redhat-acm-tenant/pods?labelSelector=tekton.dev/taskRun=<TASKRUN_NAME>"

Fetch Pod Logs

List available containers first from the pod spec (spec.initContainers and spec.containers), then fetch logs:

curl -s -H "Authorization: Bearer $(oc whoami -t)" \
  "${KA_HOST}/api/v1/namespaces/crt-redhat-acm-tenant/pods/<POD_NAME>/log?container=<CONTAINER_NAME>"

Enterprise Contract Violations

Identifying Failing EC Checks from GitHub

HEAD_SHA=$(gh pr view <PR> --repo openshift/hypershift --json headRefOid -q .headRefOid)

# Find failing EC check runs
gh api repos/openshift/hypershift/commits/${HEAD_SHA}/check-runs --paginate \
  --jq '.check_runs[] | select(.name | test("enterprise-contract")) | select(.conclusion == "failure") | {name: .name, id: .id}'

# Get PipelineRun names from check output
gh api repos/openshift/hypershift/commits/${HEAD_SHA}/check-runs --paginate \
  --jq '.check_runs[] | select(.name | test("enterprise-contract")) | select(.conclusion == "failure") | .output.text'

The PipelineRun name appears in an <a href="..."> tag in the output text.

EC Verify Task Pod Containers

The EC verify task pod has these containers with useful output:

  • step-report-json - Structured JSON with all violations (preferred)
  • step-summary - Human-readable summary
  • step-detailed-report - Detailed report

EC JSON Report Structure

{
  "success": false,
  "components": [{
    "name": "component-name",
    "containerImage": "quay.io/...",
    "violations": [{
      "msg": "Human-readable message",
      "metadata": {
        "code": "rule.code.name",
        "title": "Rule title",
        "description": "Rule description",
        "solution": "How to fix"
      }
    }]
  }]
}

Group violations by metadata.code and present a summary with counts, rule names, and individual messages.

Common EC Violation Types

tasks.required_untrusted_task_found

A required task is present but not resolved from a trusted version. Fix by updating the task reference in .tekton/ pipeline files.

trusted_task.trusted

A task version is not in the trusted task list. The violation message includes the required SHA to upgrade to. Fix by updating task digests in .tekton/ pipeline files.

Error Handling

  • oc whoami -t fails: User must log in to the Konflux cluster with oc login
  • KubeArchive /livez fails: Check that oc is logged in to the correct cluster (api.stone-prd-rh01.pg1f.p1.openshiftapps.com:6443)
  • KubeArchive returns 404 for a resource: May not be archived yet; try oc get directly in namespace crt-redhat-acm-tenant
  • Pod logs return "no logs found": Logs may have been purged; fall back to TaskRun results for the summary
  • No failing EC checks found: Report that all EC checks passed

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 0f43b29. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 5 days ago
  • konflux
  • hypershift
  • tekton
  • pipelineruns
  • kubearchive
  • ci-cd
  • enterprise-contract
  • openshift

README badge

README badge for openshift/hypershift/konflux-ec-violations

Retrieves archived Konflux PipelineRuns, TaskRuns, and pod logs via KubeArchive REST API when resources are no longer available through standard OpenShift commands. Use this when investigating enterprise contract failures, analyzing CI run results, or accessing logs from completed Konflux builds in the crt-redhat-acm-tenant namespace.

Generated from the current SKILL.md.

What cluster does this skill work with?
This skill targets Konflux CI on HyperShift at `api.stone-prd-rh01.pg1f.p1.openshiftapps.com:6443`, specifically the `crt-redhat-acm-tenant` namespace. PipelineRuns are archived by kube archiver and must be accessed via the KubeArchive REST API, not `oc get`.
How do I authenticate to KubeArchive?
Authentication uses your `oc` token. You must first log in to the Konflux cluster with `oc login`, then pass the token via `Authorization: Bearer $(oc whoami -t)` in curl requests to the KubeArchive API.
How do I find logs from a Konflux CI run?
Fetch the archived PipelineRun to get child TaskRun references, then query for pods using the TaskRun label selector, and retrieve logs from specific containers. The skill documents which containers hold structured JSON, summaries, and detailed reports.
How do I investigate enterprise contract failures?
Use the GitHub API to find failing EC check runs by commit SHA, extract the PipelineRun name from the check output, then fetch the EC verify task pod logs. The `step-report-json` container holds structured violations grouped by rule code.
What if a PipelineRun is not found via oc get?
It may have been archived already. Use the KubeArchive API directly. If KubeArchive also returns 404, the resource may not be archived yet, and you should retry `oc get` in the Konflux namespace.

Generated from the current SKILL.md. These answers refresh after source changes.