Skip to content

Commit f36c956

Browse files
author
Pat
authored
workflows: Update scorecard workflow and remove Dockerfile warnings (#9421)
Signed-off-by: Patrick Stephens <[email protected]>
1 parent 41b90b7 commit f36c956

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

.github/workflows/cron-scorecards-analysis.yaml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
# https://openssf.org/blog/2022/01/19/reducing-security-risks-in-open-source-software-at-scale-scorecards-launches-v4/
44
name: Scorecards supply-chain security
55
on:
6-
# Only the default branch is supported.
7-
branch_protection_rule:
6+
push:
7+
# Only the default branch is supported.
8+
branches:
9+
- main
810
schedule:
911
# Weekly on Saturdays.
1012
- cron: '30 1 * * 6'
@@ -31,29 +33,20 @@ jobs:
3133
- name: "Run analysis"
3234
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46
3335
with:
34-
results_file: scorecard-results.sarif
36+
results_file: results.sarif
3537
results_format: sarif
36-
# (Optional) fine-grained personal access token. Uncomment the `repo_token` line below if:
37-
# - you want to enable the Branch-Protection check on a *public* repository, or
38-
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional.
39-
repo_token: ${{ secrets.SCORECARD_TOKEN }}
40-
#
41-
# Publish the results for public repositories to enable scorecard badges. For more details, see
42-
# https://github.com/ossf/scorecard-action#publishing-results.
43-
# For private repositories, `publish_results` will automatically be set to `false`, regardless
44-
# of the value entered here.
4538
publish_results: true
4639

4740
- name: "Upload artifact"
4841
uses: actions/upload-artifact@v4
4942
with:
5043
name: SARIF file
51-
path: scorecard-results.sarif
44+
path: results.sarif
5245
retention-days: 7
5346

5447
# Upload the results to GitHub's code scanning dashboard.
5548
- name: "Upload to code-scanning"
5649
uses: github/codeql-action/upload-sarif@v3
5750
with:
58-
sarif_file: scorecard-results.sarif
51+
sarif_file: results.sarif
5952
category: ossf-scorecard

dockerfiles/Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# syntax=docker/dockerfile:1
2+
# check=skip=InvalidBaseImagePlatform
13

24
# To use this container you may need to do the following:
35
# https://askubuntu.com/a/1369504
@@ -14,10 +16,10 @@
1416
ARG RELEASE_VERSION=3.1.7
1517

1618
# For multi-arch builds - assumption is running on an AMD64 host
17-
FROM multiarch/qemu-user-static:x86_64-arm as qemu-arm32
18-
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu-arm64
19+
FROM multiarch/qemu-user-static:x86_64-arm AS qemu-arm32
20+
FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu-arm64
1921

20-
FROM debian:bookworm-slim as builder-base
22+
FROM debian:bookworm-slim AS builder-base
2123

2224
COPY --from=qemu-arm32 /usr/bin/qemu-arm-static /usr/bin/
2325
COPY --from=qemu-arm64 /usr/bin/qemu-aarch64-static /usr/bin/
@@ -30,7 +32,7 @@ ENV FLB_CHUNK_TRACE=${FLB_CHUNK_TRACE}
3032

3133
RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log
3234

33-
ENV DEBIAN_FRONTEND noninteractive
35+
ENV DEBIAN_FRONTEND=noninteractive
3436

3537
# hadolint ignore=DL3008
3638
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list && \
@@ -61,7 +63,7 @@ WORKDIR /src/fluent-bit/
6163
COPY . ./
6264

6365
# We split the builder setup out so people can target it or use as a base image without doing a full build.
64-
FROM builder-base as builder
66+
FROM builder-base AS builder
6567
WORKDIR /src/fluent-bit/build/
6668
RUN cmake -DFLB_RELEASE=On \
6769
-DFLB_JEMALLOC=On \
@@ -97,7 +99,7 @@ RUN /fluent-bit/bin/fluent-bit -J > /fluent-bit/etc/schema.json
9799

98100
# Simple example of how to properly extract packages for reuse in distroless
99101
# Taken from: https://github.com/GoogleContainerTools/distroless/issues/863
100-
FROM debian:bookworm-slim as deb-extractor
102+
FROM debian:bookworm-slim AS deb-extractor
101103
COPY --from=qemu-arm32 /usr/bin/qemu-arm-static /usr/bin/
102104
COPY --from=qemu-arm64 /usr/bin/qemu-aarch64-static /usr/bin/
103105

@@ -154,7 +156,7 @@ RUN find /dpkg/ -type d -empty -delete && \
154156

155157
# We want latest at time of build
156158
# hadolint ignore=DL3006
157-
FROM gcr.io/distroless/cc-debian12 as production
159+
FROM gcr.io/distroless/cc-debian12 AS production
158160
ARG RELEASE_VERSION
159161
ENV FLUENT_BIT_VERSION=${RELEASE_VERSION}
160162
LABEL description="Fluent Bit multi-architecture container image" \
@@ -185,7 +187,7 @@ EXPOSE 2020
185187
ENTRYPOINT [ "/fluent-bit/bin/fluent-bit" ]
186188
CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"]
187189

188-
FROM debian:bookworm-slim as debug
190+
FROM debian:bookworm-slim AS debug
189191
ARG RELEASE_VERSION
190192
ENV FLUENT_BIT_VERSION=${RELEASE_VERSION}
191193
LABEL description="Fluent Bit multi-architecture debug container image" \
@@ -203,7 +205,7 @@ LABEL description="Fluent Bit multi-architecture debug container image" \
203205

204206
COPY --from=qemu-arm32 /usr/bin/qemu-arm-static /usr/bin/
205207
COPY --from=qemu-arm64 /usr/bin/qemu-aarch64-static /usr/bin/
206-
ENV DEBIAN_FRONTEND noninteractive
208+
ENV DEBIAN_FRONTEND=noninteractive
207209

208210
# hadolint ignore=DL3008
209211
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list && \

dockerfiles/Dockerfile.windows

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
ARG WINDOWS_VERSION=ltsc2019
1515

1616
# Builder Image - Windows Server Core
17-
FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION as builder
17+
FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION AS builder
1818

1919
RUN setx /M PATH "%PATH%;C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\WinFlexBison;C:\dev\vcpkg"
2020

@@ -87,7 +87,7 @@ RUN New-Item -Path /fluent-bit/etc/ -ItemType "directory"; `
8787
#
8888
# Runtime Image - Windows Server Core
8989
#
90-
FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION as runtime
90+
FROM mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION AS runtime
9191

9292
ARG FLUENTBIT_VERSION=master
9393
ARG IMAGE_CREATE_DATE

0 commit comments

Comments
 (0)