File tree Expand file tree Collapse file tree 4 files changed +19
-8
lines changed
golang/internal/bashparser/resources Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,13 @@ repos:
7676 hooks :
7777 - id : actionlint
7878
79+ # Check shell scripts with shellcheck.
80+ - repo : https://github.com/shellcheck-py/shellcheck-py
81+ rev : v0.10.0.1
82+ hooks :
83+ - id : shellcheck
84+ exclude : ^tests/
85+
7986# Run Pylint from the local repo to make sure venv packages
8087# specified in pyproject.toml are available.
8188- repo : local
Original file line number Diff line number Diff line change 1- # Copyright (c) 2022 - 2022, Oracle and/or its affiliates. All rights reserved.
2- # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
1+ #! /bin/bash
32
4- #! bin/bash
3+ # Copyright (c) 2022 - 2025, Oracle and/or its affiliates. All rights reserved.
4+ # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
55
66set -euo pipefail
77if [[ " $COMPILE_BUILDER " = true ]]; then
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # Copyright (c) 2024 - 2024 , Oracle and/or its affiliates. All rights reserved.
3+ # Copyright (c) 2024 - 2025 , Oracle and/or its affiliates. All rights reserved.
44# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
55
66# This script checks the Verification Summary Attestation generated by Macaron.
111111
112112# Check the purl and obtain the matching subject.
113113if [[ -n " ${purl:- } " ]]; then
114- subject_digest=$( cat " $arg_vsa_path " | jq -r " .payload" | base64 -d | jq -r " .subject[] | select(.uri == \" $purl \" ) | .digest.sha256" )
114+ subject_digest=$( jq -r ' .payload' < " $arg_vsa_path " | base64 -d | jq -r " .subject[] | select(.uri == \" $purl \" ) | .digest.sha256" )
115115else
116116 log_err " Please provide the package URL."
117117 print_help
118118 exit 1
119119fi
120120
121- verify_result=$( cat " $arg_vsa_path " | jq -r " .payload" | base64 -d | jq -r " .predicate.verificationResult" )
122- verifier=$( cat " $arg_vsa_path " | jq -r " .payload" | base64 -d | jq -r " .predicate.verifier.id" )
121+ verify_result=$( jq -r " .payload" < " $arg_vsa_path " | base64 -d | jq -r " .predicate.verificationResult" )
122+ verifier=$( jq -r " .payload" < " $arg_vsa_path " | base64 -d | jq -r " .predicate.verifier.id" )
123123
124124
125125# Check if the subject and artifact digests match.
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # Copyright (c) 2023 - 2024 , Oracle and/or its affiliates. All rights reserved.
3+ # Copyright (c) 2023 - 2025 , Oracle and/or its affiliates. All rights reserved.
44# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
55
66# This script runs the Macaron Docker image.
@@ -231,6 +231,10 @@ function mount_dir_rw_allow_create() {
231231# $1: The macaron argument from which the directory is passed into this script.
232232# $2: The path to the directory on the host.
233233# $3: The path to the directory inside the container.
234+ #
235+ # Note: This function is currently unused but retained to avoid using `_mount_dir`
236+ # if not necessary, which may have unintended side effects.
237+ # shellcheck disable=SC2317
234238function mount_dir_rw_forbid_create() {
235239 arg_name=$1
236240 dir_on_host=$2
You can’t perform that action at this time.
0 commit comments