Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

revert: ci: harden + monitor GH actions with zizmor (#13048) (#13155)

Tobias Wochinger4ff398eda089
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 730019d249..f3a91a055b 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -12,7 +12,7 @@ updates:
schedule:
interval: "daily"
cooldown:
- default-days: 7
+ default-days: 5
versioning-strategy: "increase"
commit-message:
prefix: chore
@@ -54,8 +54,6 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- cooldown:
- default-days: 8
commit-message:
prefix: ci
include: scope
diff --git a/.github/workflows/_deploy_ecs_service.yml b/.github/workflows/_deploy_ecs_service.yml
index e6204d1596..e497e36ba5 100644
--- a/.github/workflows/_deploy_ecs_service.yml
+++ b/.github/workflows/_deploy_ecs_service.yml
@@ -14,8 +14,6 @@ jobs:
ecs-deploy:
runs-on: blacksmith-4vcpu-ubuntu-2404
environment: ${{ inputs.environment }}
- permissions:
- contents: read
steps:
- name: Get app name
uses: winterjung/split@a211a1c46e35fcdc4097d59dd6282d4a9859651b # v2
@@ -25,8 +23,6 @@ jobs:
separator: "-"
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Authenticate with AWS
# GitHub/AWS recommend to use OIDC here: https://github.com/aws-actions/configure-aws-credentials?tab=readme-ov-file#oidc
# Probably more painful to configure, but would remove all long-lived credentials.
@@ -43,38 +39,24 @@ jobs:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: ${{ steps.split.outputs._0 }}
IMAGE_TAG: ${{ github.sha }}
- STEPS_SPLIT_OUTPUTS__0: ${{ steps.split.outputs._0 }}
- VARS_NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: ${{ vars.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION }}
- VARS_NEXT_LANGFUSE_TRACING_SAMPLE_RATE: ${{ vars.NEXT_LANGFUSE_TRACING_SAMPLE_RATE }}
- VARS_NEXT_PUBLIC_SENTRY_ENVIRONMENT: ${{ vars.NEXT_PUBLIC_SENTRY_ENVIRONMENT }}
- VARS_NEXT_PUBLIC_DEMO_ORG_ID: ${{ vars.NEXT_PUBLIC_DEMO_ORG_ID }}
- VARS_NEXT_PUBLIC_DEMO_PROJECT_ID: ${{ vars.NEXT_PUBLIC_DEMO_PROJECT_ID }}
- VARS_NEXT_PUBLIC_SENTRY_DSN: ${{ vars.NEXT_PUBLIC_SENTRY_DSN }}
- VARS_NEXT_PUBLIC_POSTHOG_KEY: ${{ vars.NEXT_PUBLIC_POSTHOG_KEY }}
- VARS_NEXT_PUBLIC_POSTHOG_HOST: ${{ vars.NEXT_PUBLIC_POSTHOG_HOST }}
- VARS_NEXT_PUBLIC_PLAIN_APP_ID: ${{ vars.NEXT_PUBLIC_PLAIN_APP_ID }}
- VARS_SENTRY_ORG: ${{ vars.SENTRY_ORG }}
- VARS_SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
- VARS_NEXT_PUBLIC_LANGFUSE_TRACING_SAMPLE_RATE: ${{ vars.NEXT_PUBLIC_LANGFUSE_TRACING_SAMPLE_RATE }}
- SECRETS_SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
docker build \
-t $REGISTRY/$REPOSITORY:$IMAGE_TAG \
- -f ./${STEPS_SPLIT_OUTPUTS__0}/Dockerfile \
- --build-arg NEXT_PUBLIC_LANGFUSE_CLOUD_REGION=${VARS_NEXT_PUBLIC_LANGFUSE_CLOUD_REGION} \
- --build-arg NEXT_LANGFUSE_TRACING_SAMPLE_RATE=${VARS_NEXT_LANGFUSE_TRACING_SAMPLE_RATE} \
- --build-arg NEXT_PUBLIC_SENTRY_ENVIRONMENT=${VARS_NEXT_PUBLIC_SENTRY_ENVIRONMENT} \
- --build-arg NEXT_PUBLIC_DEMO_ORG_ID=${VARS_NEXT_PUBLIC_DEMO_ORG_ID} \
- --build-arg NEXT_PUBLIC_DEMO_PROJECT_ID=${VARS_NEXT_PUBLIC_DEMO_PROJECT_ID} \
- --build-arg NEXT_PUBLIC_SENTRY_DSN=${VARS_NEXT_PUBLIC_SENTRY_DSN} \
- --build-arg NEXT_PUBLIC_BUILD_ID=${IMAGE_TAG} \
- --build-arg NEXT_PUBLIC_POSTHOG_KEY=${VARS_NEXT_PUBLIC_POSTHOG_KEY} \
- --build-arg NEXT_PUBLIC_POSTHOG_HOST=${VARS_NEXT_PUBLIC_POSTHOG_HOST} \
- --build-arg NEXT_PUBLIC_PLAIN_APP_ID=${VARS_NEXT_PUBLIC_PLAIN_APP_ID} \
- --build-arg SENTRY_AUTH_TOKEN=${SECRETS_SENTRY_AUTH_TOKEN} \
- --build-arg SENTRY_ORG=${VARS_SENTRY_ORG} \
- --build-arg SENTRY_PROJECT=${VARS_SENTRY_PROJECT} \
- --build-arg NEXT_PUBLIC_LANGFUSE_TRACING_SAMPLE_RATE=${VARS_NEXT_PUBLIC_LANGFUSE_TRACING_SAMPLE_RATE} \
+ -f ./${{ steps.split.outputs._0 }}/Dockerfile \
+ --build-arg NEXT_PUBLIC_LANGFUSE_CLOUD_REGION=${{ vars.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION }} \
+ --build-arg NEXT_LANGFUSE_TRACING_SAMPLE_RATE=${{ vars.NEXT_LANGFUSE_TRACING_SAMPLE_RATE }} \
+ --build-arg NEXT_PUBLIC_SENTRY_ENVIRONMENT=${{ vars.NEXT_PUBLIC_SENTRY_ENVIRONMENT }} \
+ --build-arg NEXT_PUBLIC_DEMO_ORG_ID=${{ vars.NEXT_PUBLIC_DEMO_ORG_ID }} \
+ --build-arg NEXT_PUBLIC_DEMO_PROJECT_ID=${{ vars.NEXT_PUBLIC_DEMO_PROJECT_ID }} \
+ --build-arg NEXT_PUBLIC_SENTRY_DSN=${{ vars.NEXT_PUBLIC_SENTRY_DSN }} \
+ --build-arg NEXT_PUBLIC_BUILD_ID=${{ github.sha }} \
+ --build-arg NEXT_PUBLIC_POSTHOG_KEY=${{ vars.NEXT_PUBLIC_POSTHOG_KEY }} \
+ --build-arg NEXT_PUBLIC_POSTHOG_HOST=${{ vars.NEXT_PUBLIC_POSTHOG_HOST }} \
+ --build-arg NEXT_PUBLIC_PLAIN_APP_ID=${{ vars.NEXT_PUBLIC_PLAIN_APP_ID }} \
+ --build-arg SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \
+ --build-arg SENTRY_ORG=${{ vars.SENTRY_ORG }} \
+ --build-arg SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }} \
+ --build-arg NEXT_PUBLIC_LANGFUSE_TRACING_SAMPLE_RATE=${{ vars.NEXT_PUBLIC_LANGFUSE_TRACING_SAMPLE_RATE }} \
.
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
- name: Render AWS ECS Task Definition
diff --git a/.github/workflows/cla-assistant.yml b/.github/workflows/cla-assistant.yml
index 67f732d85c..a5ddafd2cc 100644
--- a/.github/workflows/cla-assistant.yml
+++ b/.github/workflows/cla-assistant.yml
@@ -9,8 +9,6 @@ on:
issue_comment:
types: [created]
-permissions: {}
-
jobs:
retrigger_cla:
# Only run on PR comments (not issue comments) with the /check-cla command
diff --git a/.github/workflows/claude-review-maintainer-prs.yml b/.github/workflows/claude-review-maintainer-prs.yml
index 3aa865bdd5..1e10341062 100644
--- a/.github/workflows/claude-review-maintainer-prs.yml
+++ b/.github/workflows/claude-review-maintainer-prs.yml
@@ -1,15 +1,14 @@
name: Claude Review on Maintainer PRs
on:
- pull_request:
+ pull_request_target:
types:
- opened
- ready_for_review
jobs:
comment:
- # Only run on PRs that are not drafts and are from the same repository (i.e., not from forks)
- if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.repository
+ if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
issues: write
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index f5d69ba33a..075653c845 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -56,8 +56,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
index fa566d20db..0b68b1daa7 100644
--- a/.github/workflows/codespell.yml
+++ b/.github/workflows/codespell.yml
@@ -23,7 +23,5 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Codespell
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2
diff --git a/.github/workflows/dependabot-rebase-stale.yml b/.github/workflows/dependabot-rebase-stale.yml
index 9c768dfd3c..53f972653d 100644
--- a/.github/workflows/dependabot-rebase-stale.yml
+++ b/.github/workflows/dependabot-rebase-stale.yml
@@ -6,8 +6,6 @@ on:
- main
workflow_dispatch:
-permissions: {}
-
jobs:
rebase-dependabot:
runs-on: ubuntu-latest
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 9da3d369d7..fe50387818 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -27,8 +27,6 @@ on:
- prod-jp
required: true
-permissions: {}
-
concurrency:
# Support concurrent `push` and `workflow_dispatch`` actions
group: deploy-${{ github.event_name }}-${{ github.ref }}
@@ -101,8 +99,7 @@ jobs:
ecs-deploy:
uses: ./.github/workflows/_deploy_ecs_service.yml
needs: [affected-services, affected-environments]
- permissions:
- contents: read
+ secrets: inherit
strategy:
matrix:
service: ${{ fromJson(needs.affected-services.outputs.services) }}
diff --git a/.github/workflows/licencecheck.yml b/.github/workflows/licencecheck.yml
index 196ff436c9..953a53262e 100644
--- a/.github/workflows/licencecheck.yml
+++ b/.github/workflows/licencecheck.yml
@@ -9,18 +9,12 @@ on:
branches:
- "main"
-permissions:
- contents: read
- checks: write # Needed to create a check run for the license compliance check results
-
jobs:
license_check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Setup node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
@@ -50,8 +44,6 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Echo error
if: failure()
- run: echo "::error::${STEPS_LICENSE_CHECK_REPORT_OUTPUTS_REPORT}"
- env:
- STEPS_LICENSE_CHECK_REPORT_OUTPUTS_REPORT: ${{ steps.license_check_report.outputs.report }}
+ run: echo "::error::${{ steps.license_check_report.outputs.report }}"
- name: Delete license-checker CSV file
run: rm npm-license-checker.csv
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index d3d007a5d0..14e0fbab3c 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -12,9 +12,6 @@ on:
branches:
- "**"
-permissions:
- contents: read
-
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
@@ -27,7 +24,6 @@ jobs:
llm_connections_changed: ${{ steps.filter.outputs.llm_connections }}
timeout-minutes: 15
permissions:
- contents: read
pull-requests: read
steps:
- id: skip_check
@@ -40,7 +36,6 @@ jobs:
# may save additional git fetch roundtrip if
# merge-base is found within latest N commits
fetch-depth: 20
- persist-credentials: false
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
@@ -56,18 +51,16 @@ jobs:
if: needs.pre-job.outputs.should_skip != 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
version: 10.33.0
- - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 # zizmor: ignore[cache-poisoning] lint job dependency cache only; no released artifacts are built or published from this cached state
+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
- name: Setup Turbo cache
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 # zizmor: ignore[cache-poisoning] lint cache only; publish jobs rebuild artifacts and do not restore this cache
+ uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: .turbo
key: ${{ runner.os }}-turbo-lint-${{ github.sha }}
@@ -92,11 +85,10 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- persist-credentials: false
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
version: 10.33.0
- - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 # zizmor: ignore[cache-poisoning] prettier check dependency cache only; no released artifacts are built or published from this cached state
+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: "pnpm"
@@ -138,8 +130,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Login to Docker Hub
if: github.repository == 'langfuse/langfuse' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
@@ -208,8 +198,6 @@ jobs:
shard: [1, 2, 3]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Install golang-migrate for Clickhouse migrations
run: |
curl -L https://github.com/golang-migrate/migrate/releases/download/v4.19.1/migrate.linux-amd64.tar.gz | tar xvz
@@ -225,7 +213,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME_READ }}
password: ${{ secrets.DOCKERHUB_TOKEN_READ }}
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 # zizmor: ignore[cache-poisoning] test job dependency cache only; no released artifacts are built or published from this cached state
+ uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
@@ -244,14 +232,14 @@ jobs:
echo "ADMIN_API_KEY=admin-api-key" >> .env
echo "LANGFUSE_EE_LICENSE_KEY=langfuse_ee_test" >> .env
- name: Setup Turbo cache
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 # zizmor: ignore[cache-poisoning] test job cache only; publish jobs rebuild artifacts and do not restore this cache
+ uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Cache Next.js builds
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 # zizmor: ignore[cache-poisoning] test-only Next.js cache; not consumed by artifact publishing or release jobs
+ uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/.npm
@@ -323,8 +311,6 @@ jobs:
deploy-mode: ["", "-azure", "-redis-cluster"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
version: 10.33.0
@@ -335,7 +321,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME_READ }}
password: ${{ secrets.DOCKERHUB_TOKEN_READ }}
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 # zizmor: ignore[cache-poisoning] worker test dependency cache only; no release artifacts are produced from this cache
+ uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
@@ -396,8 +382,6 @@ jobs:
name: test-worker-llm-connections (node24, pg15)
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
version: 10.33.0
@@ -408,7 +392,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME_READ }}
password: ${{ secrets.DOCKERHUB_TOKEN_READ }}
- name: Use Node.js 24
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 # zizmor: ignore[cache-poisoning] llm-connection test dependency cache only; privileged secrets are used here, but this cache is not consumed by artifact publishing
+ uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: "pnpm"
@@ -469,12 +453,10 @@ jobs:
if: needs.pre-job.outputs.should_skip != 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
version: 10.33.0
- - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 # zizmor: ignore[cache-poisoning] e2e dependency cache only; release images are rebuilt later without restoring this cache
+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: "pnpm"
@@ -486,7 +468,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME_READ }}
password: ${{ secrets.DOCKERHUB_TOKEN_READ }}
- name: Setup Turbo cache
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 # zizmor: ignore[cache-poisoning] e2e cache only; no published artifact path restores this cache
+ uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: .turbo
key: ${{ runner.os }}-turbo-e2e-${{ github.sha }}
@@ -494,7 +476,7 @@ jobs:
${{ runner.os }}-turbo-e2e-
${{ runner.os }}-turbo-
- name: Cache Next.js builds
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 # zizmor: ignore[cache-poisoning] e2e-only Next.js cache; not part of any artifact build or publishing flow
+ uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/.npm
@@ -548,8 +530,6 @@ jobs:
if: needs.pre-job.outputs.should_skip != 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Login to Docker Hub
if: github.repository == 'langfuse/langfuse' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
@@ -559,7 +539,7 @@ jobs:
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
version: 10.33.0
- - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 # zizmor: ignore[cache-poisoning] server e2e dependency cache only; release/publish steps rebuild separately
+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: "pnpm"
@@ -651,9 +631,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Output job results
run: |
- echo "Job results: ${STEPS_SET_SUCCESS_OUTPUT_OUTPUTS_SUCCESS}"
- env:
- STEPS_SET_SUCCESS_OUTPUT_OUTPUTS_SUCCESS: ${{ steps.set-success-output.outputs.success }}
+ echo "Job results: ${{ steps.set-success-output.outputs.success }}"
build-docker-image-release:
needs: all-ci-passed
@@ -696,8 +674,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Set NEXT_PUBLIC_BUILD_ID
run: echo "NEXT_PUBLIC_BUILD_ID=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Log in to the GitHub Container registry
@@ -753,19 +729,15 @@ jobs:
provenance: false
sbom: false
- name: Record pushed digests
- env:
- DIGEST_GHCR: ${{ steps.build-ghcr.outputs.digest }}
- DIGEST_DOCKERHUB: ${{ steps.build-dockerhub.outputs.digest }}
- PLATFORM_TAG: ${{ matrix.platform_tag }}
run: |
- if [ -z "$DIGEST_GHCR" ] || [ -z "$DIGEST_DOCKERHUB" ]; then
+ if [ -z '${{ steps.build-ghcr.outputs.digest }}' ] || [ -z '${{ steps.build-dockerhub.outputs.digest }}' ]; then
echo "Missing registry digest output"
exit 1
fi
mkdir -p "$RUNNER_TEMP/digests/ghcr" "$RUNNER_TEMP/digests/dockerhub"
- printf '%s\n' "$DIGEST_GHCR" > "$RUNNER_TEMP/digests/ghcr/${PLATFORM_TAG}.txt"
- printf '%s\n' "$DIGEST_DOCKERHUB" > "$RUNNER_TEMP/digests/dockerhub/${PLATFORM_TAG}.txt"
+ printf '%s\n' '${{ steps.build-ghcr.outputs.digest }}' > "$RUNNER_TEMP/digests/ghcr/${{ matrix.platform_tag }}.txt"
+ printf '%s\n' '${{ steps.build-dockerhub.outputs.digest }}' > "$RUNNER_TEMP/digests/dockerhub/${{ matrix.platform_tag }}.txt"
- name: Upload release digests
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
@@ -844,10 +816,6 @@ jobs:
type=semver,pattern={{major}},enable=${{ !contains(github.ref, '-rc') }}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v3') && !contains(github.ref, '-rc') }}
- name: Publish multi-platform manifest to GitHub Container Registry
- env:
- STEPS_META_GHCR_OUTPUTS_TAGS: ${{ steps.meta-ghcr.outputs.tags }}
- IMAGE_NAME: ${{ matrix.image_name }}
- COMPONENT: ${{ matrix.component }}
run: |
ghcr_tags=()
ghcr_sources=()
@@ -855,27 +823,23 @@ jobs:
while IFS= read -r tag; do
[ -n "$tag" ] || continue
ghcr_tags+=("-t" "$tag")
- done <<EOF
- ${STEPS_META_GHCR_OUTPUTS_TAGS}
+ done <<'EOF'
+ ${{ steps.meta-ghcr.outputs.tags }}
EOF
shopt -s nullglob
for digest_file in "$RUNNER_TEMP"/digests/ghcr/*.txt; do
digest="$(cat "$digest_file")"
- ghcr_sources+=("ghcr.io/langfuse/${IMAGE_NAME}@$digest")
+ ghcr_sources+=("ghcr.io/langfuse/${{ matrix.image_name }}@$digest")
done
if [ "${#ghcr_sources[@]}" -lt 2 ]; then
- echo "Expected amd64 and arm64 GHCR digests for $COMPONENT"
+ echo "Expected amd64 and arm64 GHCR digests for ${{ matrix.component }}"
exit 1
fi
docker buildx imagetools create "${ghcr_tags[@]}" "${ghcr_sources[@]}"
- name: Publish multi-platform manifest to Docker Hub
- env:
- STEPS_META_DOCKERHUB_OUTPUTS_TAGS: ${{ steps.meta-dockerhub.outputs.tags }}
- IMAGE_NAME: ${{ matrix.image_name }}
- COMPONENT: ${{ matrix.component }}
run: |
dockerhub_tags=()
dockerhub_sources=()
@@ -883,32 +847,29 @@ jobs:
while IFS= read -r tag; do
[ -n "$tag" ] || continue
dockerhub_tags+=("-t" "$tag")
- done <<EOF
- ${STEPS_META_DOCKERHUB_OUTPUTS_TAGS}
+ done <<'EOF'
+ ${{ steps.meta-dockerhub.outputs.tags }}
EOF
shopt -s nullglob
for digest_file in "$RUNNER_TEMP"/digests/dockerhub/*.txt; do
digest="$(cat "$digest_file")"
- dockerhub_sources+=("langfuse/${IMAGE_NAME}@$digest")
+ dockerhub_sources+=("langfuse/${{ matrix.image_name }}@$digest")
done
if [ "${#dockerhub_sources[@]}" -lt 2 ]; then
- echo "Expected amd64 and arm64 Docker Hub digests for $COMPONENT"
+ echo "Expected amd64 and arm64 Docker Hub digests for ${{ matrix.component }}"
exit 1
fi
docker buildx imagetools create "${dockerhub_tags[@]}" "${dockerhub_sources[@]}"
- name: Inspect published manifests
run: |
- ghcr_first_tag="$(printf '%s\n' "${STEPS_META_GHCR_OUTPUTS_TAGS}" | sed -n '1p')"
- dockerhub_first_tag="$(printf '%s\n' "${STEPS_META_DOCKERHUB_OUTPUTS_TAGS}" | sed -n '1p')"
+ ghcr_first_tag="$(printf '%s\n' "${{ steps.meta-ghcr.outputs.tags }}" | sed -n '1p')"
+ dockerhub_first_tag="$(printf '%s\n' "${{ steps.meta-dockerhub.outputs.tags }}" | sed -n '1p')"
docker buildx imagetools inspect "$ghcr_first_tag"
docker buildx imagetools inspect "$dockerhub_first_tag"
- env:
- STEPS_META_GHCR_OUTPUTS_TAGS: ${{ steps.meta-ghcr.outputs.tags }}
- STEPS_META_DOCKERHUB_OUTPUTS_TAGS: ${{ steps.meta-dockerhub.outputs.tags }}
notify-docker-image-release:
needs:
diff --git a/.github/workflows/promote-main-to-production.yml b/.github/workflows/promote-main-to-production.yml
index eb1c19de8a..82bbaf6ad2 100644
--- a/.github/workflows/promote-main-to-production.yml
+++ b/.github/workflows/promote-main-to-production.yml
@@ -12,8 +12,6 @@ concurrency:
group: promote-main-to-production
cancel-in-progress: false
-permissions: {}
-
jobs:
promote:
runs-on: ubuntu-latest
@@ -21,19 +19,16 @@ jobs:
steps:
- name: Validate confirmation
run: |
- if [ "${INPUT_CONFIRM}" != "promote" ]; then
+ if [ "${{ github.event.inputs.confirm }}" != "promote" ]; then
echo "Input 'confirm' must be 'promote'."
exit 1
fi
- env:
- INPUT_CONFIRM: ${{ github.event.inputs.confirm }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GH_ACCESS_TOKEN }}
- persist-credentials: false
- name: Print commit refs
run: |
@@ -46,6 +41,4 @@ jobs:
fi
- name: Force push main to production
- run: git push "https://x-access-token:${GH_ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" +main:production
- env:
- GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
+ run: git push origin +main:production
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1a89d00ea1..4bdef97125 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,8 +5,6 @@ on:
tags:
- "v3.[0-9]+.[0-9]+" # Semantic version tags
-permissions: {}
-
jobs:
release:
runs-on: ubuntu-latest
@@ -17,8 +15,5 @@ jobs:
ref: main # Always checkout main even for tagged releases
fetch-depth: 0
token: ${{ secrets.GH_ACCESS_TOKEN }}
- persist-credentials: false
- name: Push to production
- run: git push "https://x-access-token:${GH_ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" +main:production
- env:
- GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
+ run: git push origin +main:production
diff --git a/.github/workflows/sdk-api-spec.yml b/.github/workflows/sdk-api-spec.yml
index f8e7c86b6e..64415adce4 100644
--- a/.github/workflows/sdk-api-spec.yml
+++ b/.github/workflows/sdk-api-spec.yml
@@ -12,18 +12,12 @@ concurrency:
group: sdk-api-spec-${{ github.ref }}
cancel-in-progress: true
-permissions:
- contents: read
-
jobs:
generate-sdk-api-specs:
runs-on: ubuntu-latest
- environment: "protected branches"
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
diff --git a/.github/workflows/snyk-web.yml b/.github/workflows/snyk-web.yml
index 27d2617cf1..1af8dc61d8 100644
--- a/.github/workflows/snyk-web.yml
+++ b/.github/workflows/snyk-web.yml
@@ -3,18 +3,11 @@ on:
push:
branches: ["production", "main"]
-permissions:
- contents: read
- security-events: write
-
jobs:
snyk:
runs-on: ubuntu-latest
- environment: snyk
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Run Snyk to check Docker image for vulnerabilities
# Snyk can be used to break the build when it detects vulnerabilities.
# In this case we want to upload the issues to GitHub Code Scanning
diff --git a/.github/workflows/snyk-worker.yml b/.github/workflows/snyk-worker.yml
index 83677cde2d..2e4e93ae33 100644
--- a/.github/workflows/snyk-worker.yml
+++ b/.github/workflows/snyk-worker.yml
@@ -3,18 +3,11 @@ on:
push:
branches: ["production", "main"]
-permissions:
- contents: read
- security-events: write
-
jobs:
snyk:
runs-on: ubuntu-latest
- environment: snyk
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- name: Run Snyk to check Docker image for vulnerabilities
# Snyk can be used to break the build when it detects vulnerabilities.
# In this case we want to upload the issues to GitHub Code Scanning
diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml
deleted file mode 100644
index 0b0c98fee8..0000000000
--- a/.github/workflows/zizmor.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: Check GitHub Actions
-
-on:
- workflow_dispatch:
- push:
- branches:
- - "main"
- merge_group:
- pull_request:
- branches:
- - "main"
-
-permissions: {}
-
-jobs:
- zizmor:
- name: Check GitHub Actions security
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
- runs-on: ubuntu-latest
- permissions:
- security-events: write
- contents: read
- steps:
- - name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- - name: Run zizmor
- uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
- with:
- # Means that the action will only report issues, but not fail the workflow.
- # Blocking merges are handled by rulesets:
- # https://docs.github.com/en/code-security/concepts/code-scanning/about-code-scanning-alerts#pull-request-check-failures-for-code-scanning-alerts
- advanced-security: true
diff --git a/.github/zizmor.yml b/.github/zizmor.yml
deleted file mode 100644
index c8f5688fdc..0000000000
--- a/.github/zizmor.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-rules:
- secrets-outside-env:
- config:
- allow:
- # Shared read-only CI credentials used to avoid Docker Hub rate limits in test jobs.
- - DOCKERHUB_USERNAME_READ
- - DOCKERHUB_TOKEN_READ
- # Shared integration-test credentials intentionally kept together for the multi-provider LLM connection test job.
- - LANGFUSE_LLM_CONNECTION_OPENAI_KEY
- - LANGFUSE_LLM_CONNECTION_ANTHROPIC_KEY
- - LANGFUSE_LLM_CONNECTION_AZURE_KEY
- - LANGFUSE_LLM_CONNECTION_AZURE_BASE_URL
- - LANGFUSE_LLM_CONNECTION_AZURE_MODEL
- - LANGFUSE_LLM_CONNECTION_BEDROCK_ACCESS_KEY_ID
- - LANGFUSE_LLM_CONNECTION_BEDROCK_SECRET_ACCESS_KEY
- - LANGFUSE_LLM_CONNECTION_BEDROCK_API_KEY
- - LANGFUSE_LLM_CONNECTION_BEDROCK_REGION
- - LANGFUSE_LLM_CONNECTION_VERTEXAI_KEY
- - LANGFUSE_LLM_CONNECTION_GOOGLEAISTUDIO_KEY
- # Shared CI notification secret, not tied to a deployment environment.
- - SLACK_WEBHOOK_URL
- # Fern token is generation-only; GitHub write actions are handled by GH_ACCESS_TOKEN in a protected environment.
- - FERN_TOKEN