forked from mirrors/kingfisher
openssf scorecard suggested improvements
This commit is contained in:
parent
db97997521
commit
e2c7dc3e41
4 changed files with 17 additions and 6 deletions
|
|
@ -7,6 +7,11 @@ apt-get install -y --no-install-recommends \
|
|||
|
||||
cd "$SRC/kingfisher"
|
||||
|
||||
# OSS-Fuzz's clang/libc++ toolchain builds vendored Vectorscan against Ubuntu
|
||||
# 20.04's Boost headers. Re-enable the removed unary_function/binary_function
|
||||
# compatibility shims so Boost 1.71 still compiles in C++17 mode.
|
||||
export CXXFLAGS="${CXXFLAGS:-} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION"
|
||||
|
||||
# Build all fuzz targets in release mode with debug assertions
|
||||
cargo fuzz build -O --debug-assertions
|
||||
|
||||
|
|
|
|||
4
.github/workflows/pypi.yml
vendored
4
.github/workflows/pypi.yml
vendored
|
|
@ -34,7 +34,7 @@ jobs:
|
|||
elif [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" && -n "${INPUT_TAG}" ]]; then
|
||||
TAG="${INPUT_TAG}"
|
||||
else
|
||||
TAG=$(gh release view --json tagName --jq .tagName)
|
||||
TAG=$(gh release view --repo "${{ github.repository }}" --json tagName --jq .tagName)
|
||||
fi
|
||||
if [[ ! "${TAG}" =~ ^v[0-9A-Za-z._+-]+$ ]]; then
|
||||
echo "Invalid tag format: ${TAG}" >&2
|
||||
|
|
@ -87,7 +87,7 @@ jobs:
|
|||
done
|
||||
|
||||
- name: Install build tooling
|
||||
run: python -m pip install --upgrade --require-hashes -r .github/requirements/pypi-build.txt
|
||||
run: python -m pip install --upgrade --only-binary :all: --require-hashes -r .github/requirements/pypi-build.txt
|
||||
|
||||
- name: Build wheels
|
||||
shell: bash
|
||||
|
|
|
|||
10
.github/workflows/release-docker.yml
vendored
10
.github/workflows/release-docker.yml
vendored
|
|
@ -38,7 +38,6 @@ jobs:
|
|||
# populated only for workflow_dispatch
|
||||
MANUAL_TAG: ${{ github.event.inputs.tag }}
|
||||
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ "${GITHUB_EVENT_NAME}" == "release" ]]; then
|
||||
|
|
@ -47,9 +46,12 @@ jobs:
|
|||
RAW_TAG="${MANUAL_TAG}"
|
||||
else
|
||||
# manual w/o tag → ask GitHub API for latest release tag
|
||||
RAW_TAG=$(curl -sSL -H "Authorization: Bearer ${GH_TOKEN}" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/releases/latest" \
|
||||
| jq -r .tag_name)
|
||||
RAW_TAG=$(gh release view --repo "${{ github.repository }}" --json tagName --jq .tagName)
|
||||
fi
|
||||
|
||||
if [[ ! "${RAW_TAG}" =~ ^v[0-9A-Za-z._+-]+$ ]]; then
|
||||
echo "Invalid tag format: ${RAW_TAG}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Strip a leading "v" so v1.2.3 → 1.2.3
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ RUN set -eux; \
|
|||
# optional cleanup to keep the image small
|
||||
rm -rf /app/*
|
||||
|
||||
RUN addgroup -S app && adduser -S -G app -h /app app && chown -R app:app /app
|
||||
|
||||
USER app
|
||||
|
||||
# quick smoke-test so the build fails early if something’s wrong
|
||||
RUN kingfisher --version
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue