mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 02:26:42 +01:00
chore(deps): update tools to latest versions (#3413)
* chore(deps): update tools to latest versions Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix linting Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: spiffcs <32073428+spiffcs@users.noreply.github.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
parent
abd6abe186
commit
ac8be4ad41
10
.binny.yaml
10
.binny.yaml
@ -18,7 +18,7 @@ tools:
|
|||||||
# used to sign mac binaries at release
|
# used to sign mac binaries at release
|
||||||
- name: quill
|
- name: quill
|
||||||
version:
|
version:
|
||||||
want: v0.4.2
|
want: v0.5.0
|
||||||
method: github-release
|
method: github-release
|
||||||
with:
|
with:
|
||||||
repo: anchore/quill
|
repo: anchore/quill
|
||||||
@ -26,7 +26,7 @@ tools:
|
|||||||
# used for linting
|
# used for linting
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
version:
|
version:
|
||||||
want: v1.61.0
|
want: v1.62.0
|
||||||
method: github-release
|
method: github-release
|
||||||
with:
|
with:
|
||||||
repo: golangci/golangci-lint
|
repo: golangci/golangci-lint
|
||||||
@ -58,7 +58,7 @@ tools:
|
|||||||
# used to release all artifacts
|
# used to release all artifacts
|
||||||
- name: goreleaser
|
- name: goreleaser
|
||||||
version:
|
version:
|
||||||
want: v2.3.2
|
want: v2.4.4
|
||||||
method: github-release
|
method: github-release
|
||||||
with:
|
with:
|
||||||
repo: goreleaser/goreleaser
|
repo: goreleaser/goreleaser
|
||||||
@ -103,7 +103,7 @@ tools:
|
|||||||
# used for running all local and CI tasks
|
# used for running all local and CI tasks
|
||||||
- name: task
|
- name: task
|
||||||
version:
|
version:
|
||||||
want: v3.39.2
|
want: v3.40.0
|
||||||
method: github-release
|
method: github-release
|
||||||
with:
|
with:
|
||||||
repo: go-task/task
|
repo: go-task/task
|
||||||
@ -111,7 +111,7 @@ tools:
|
|||||||
# used for triggering a release
|
# used for triggering a release
|
||||||
- name: gh
|
- name: gh
|
||||||
version:
|
version:
|
||||||
want: v2.60.1
|
want: v2.61.0
|
||||||
method: github-release
|
method: github-release
|
||||||
with:
|
with:
|
||||||
repo: cli/cli
|
repo: cli/cli
|
||||||
|
|||||||
@ -156,13 +156,13 @@ func validateScanArgs(cmd *cobra.Command, args []string) error {
|
|||||||
return validateArgs(cmd, args, "an image/directory argument is required")
|
return validateArgs(cmd, args, "an image/directory argument is required")
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateArgs(cmd *cobra.Command, args []string, error string) error {
|
func validateArgs(cmd *cobra.Command, args []string, err string) error {
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
// in the case that no arguments are given we want to show the help text and return with a non-0 return code.
|
// in the case that no arguments are given we want to show the help text and return with a non-0 return code.
|
||||||
if err := cmd.Help(); err != nil {
|
if err := cmd.Help(); err != nil {
|
||||||
return fmt.Errorf("unable to display help: %w", err)
|
return fmt.Errorf("unable to display help: %w", err)
|
||||||
}
|
}
|
||||||
return fmt.Errorf("%v", error)
|
return fmt.Errorf("%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return cobra.MaximumNArgs(1)(cmd, args)
|
return cobra.MaximumNArgs(1)(cmd, args)
|
||||||
|
|||||||
@ -17,11 +17,11 @@ const defaultStdoutLogBufferSize = 1024
|
|||||||
// restore := CaptureStdoutToTraceLog()
|
// restore := CaptureStdoutToTraceLog()
|
||||||
// // here, stdout will be captured and redirected to the provided writer
|
// // here, stdout will be captured and redirected to the provided writer
|
||||||
// restore() // block until the output has all been sent to the writer and restore the original stdout
|
// restore() // block until the output has all been sent to the writer and restore the original stdout
|
||||||
func CaptureStdoutToTraceLog() (close func()) {
|
func CaptureStdoutToTraceLog() func() {
|
||||||
return capture(&os.Stdout, newLogWriter(), defaultStdoutLogBufferSize)
|
return capture(&os.Stdout, newLogWriter(), defaultStdoutLogBufferSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
func capture(target **os.File, writer io.Writer, bufSize int) (close func()) {
|
func capture(target **os.File, writer io.Writer, bufSize int) func() {
|
||||||
original := *target
|
original := *target
|
||||||
|
|
||||||
r, w, _ := os.Pipe()
|
r, w, _ := os.Pipe()
|
||||||
|
|||||||
@ -61,6 +61,11 @@ test_negative_snapshot_download_asset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test_sboms_have_packages() {
|
test_sboms_have_packages() {
|
||||||
|
if ! command -v jq &> /dev/null; then
|
||||||
|
echo "jq command not found. Please install jq or ensure it is in your PATH."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
find "$(snapshot_dir)/" -name "*.sbom" -print0 | while IFS= read -r -d '' file; do
|
find "$(snapshot_dir)/" -name "*.sbom" -print0 | while IFS= read -r -d '' file; do
|
||||||
count=$(cat "$file" | jq ".artifacts | length")
|
count=$(cat "$file" | jq ".artifacts | length")
|
||||||
if [ "$count" -lt 80 ]; then
|
if [ "$count" -lt 80 ]; then
|
||||||
|
|||||||
@ -32,8 +32,14 @@ test_positive_snapshot_install_asset() {
|
|||||||
arch="amd64_v1"
|
arch="amd64_v1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# note: this is a change made in goreleaser v1.62.0
|
||||||
|
local_suffix=""
|
||||||
|
if [ "${arch}" == "arm64" ]; then
|
||||||
|
local_suffix="_v8.0"
|
||||||
|
fi
|
||||||
|
|
||||||
assertFilesEqual \
|
assertFilesEqual \
|
||||||
"$(snapshot_dir)/${os}-build_${os}_${arch}/${binary}" \
|
"$(snapshot_dir)/${os}-build_${os}_${arch}${local_suffix}/${binary}" \
|
||||||
"${expected_path}" \
|
"${expected_path}" \
|
||||||
"unable to verify installation of os=${os} arch=${arch} format=${format}"
|
"unable to verify installation of os=${os} arch=${arch} format=${format}"
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
FROM alpine:3.6
|
FROM alpine:3.6
|
||||||
RUN apk update && apk add python3 wget curl unzip make ca-certificates
|
RUN apk update && apk add python3 wget curl unzip make ca-certificates jq
|
||||||
RUN curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64" && \
|
RUN curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64" && \
|
||||||
mv cosign-linux-amd64 /usr/local/bin/cosign && \
|
mv cosign-linux-amd64 /usr/local/bin/cosign && \
|
||||||
chmod +x /usr/local/bin/cosign
|
chmod +x /usr/local/bin/cosign
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
FROM --platform=linux/amd64 ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba
|
FROM --platform=linux/amd64 ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba
|
||||||
RUN apt update -y && apt install make python3 curl unzip -y
|
RUN apt update -y && apt install make python3 curl unzip jq -y
|
||||||
RUN LATEST_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | grep tag_name | cut -d : -f2 | tr -d "v\", ") && \
|
RUN LATEST_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | grep tag_name | cut -d : -f2 | tr -d "v\", ") && \
|
||||||
curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign_${LATEST_VERSION}_amd64.deb" && \
|
curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign_${LATEST_VERSION}_amd64.deb" && \
|
||||||
dpkg -i cosign_${LATEST_VERSION}_amd64.deb
|
dpkg -i cosign_${LATEST_VERSION}_amd64.deb
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user