Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 6 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ updates:
default-days: 1

# Tracks the digest-pinned `COPY --from` image (ghcr.io/astral-sh/uv) in
# docker/Dockerfile.base. Note: the python:3.12-slim base/builder images are
# passed via build args from docker/docker-bake.hcl and the `docker run` image
# strings in workflows are not parsed by Dependabot; bump those manually.
# docker/Dockerfile.base. Note: the python:3.12-slim base/builder digests are
# carried both as the build_image/base_image ARG defaults in Dockerfile.base
# and in docker/docker-bake.hcl (which overrides them at build time).
# Dependabot does NOT parse images that reach FROM via an ARG, nor the
# `docker run` image strings in workflows, so bump those by hand and keep the
# Dockerfile.base ARG defaults and docker-bake.hcl digests in sync.
- package-ecosystem: 'docker'
directory: '/docker'
schedule:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CodeQL

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

# Cancel a superseded run for the same ref (e.g. a force-push to a PR) so we
# don't burn CI minutes analyzing commits that are already stale.
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
# Required to upload code-scanning results to the Security tab.
security-events: write
# Required by codeql-action to read the workflow/CI config.
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
# Haystack is a Python project; Python is interpreted, so no build is
# needed. Add `javascript-typescript` here if the docs-website JS code
# should also be scanned.
- language: python
build-mode: none

steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3.36.2
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3.36.2
with:
category: "/language:${{ matrix.language }}"
2 changes: 1 addition & 1 deletion .github/workflows/docs_search_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install Docusaurus and build docs-website
working-directory: docs-website
run: |
npm install --ignore-scripts
npm ci --ignore-scripts
npm rebuild sharp
npm run build

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ jobs:
retention-days: 5

- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/upload-sarif@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3.36.2
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/workflows_linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
go-version: ">=1.24.0"

- name: Install actionlint
run: go install github.com/rhysd/actionlint/cmd/actionlint@latest
run: go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12

- name: Run actionlint
env:
Expand Down
11 changes: 7 additions & 4 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
ARG build_image
ARG base_image
# Pinned digest defaults so the base images are resolvable by hash even when
# the args are not passed (e.g. by supply-chain scanners or a plain `docker build`).
# docker/docker-bake.hcl overrides these at build time; keep the digests in sync.
ARG build_image=python:3.12-slim@sha256:090ba77e2958f6af52a5341f788b50b032dd4ca28377d2893dcf1ecbdfdfe203
ARG base_image=python:3.12-slim@sha256:090ba77e2958f6af52a5341f788b50b032dd4ca28377d2893dcf1ecbdfdfe203

FROM $build_image AS build-image
FROM ${build_image} AS build-image

ARG DEBIAN_FRONTEND=noninteractive
ARG haystack_version
Expand All @@ -25,7 +28,7 @@ ENV PATH="/opt/venv/bin:$PATH"
RUN uv pip install --no-cache-dir -U setuptools && \
uv pip install --no-cache-dir .

FROM $base_image AS final
FROM ${base_image} AS final

COPY --from=build-image /opt/venv /opt/venv

Expand Down
Loading