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:
76
76
hooks :
77
77
- id : actionlint
78
78
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
+
79
86
# Run Pylint from the local repo to make sure venv packages
80
87
# specified in pyproject.toml are available.
81
88
- 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
3
2
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/.
5
5
6
6
set -euo pipefail
7
7
if [[ " $COMPILE_BUILDER " = true ]]; then
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
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.
4
4
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
5
5
6
6
# This script checks the Verification Summary Attestation generated by Macaron.
111
111
112
112
# Check the purl and obtain the matching subject.
113
113
if [[ -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" )
115
115
else
116
116
log_err " Please provide the package URL."
117
117
print_help
118
118
exit 1
119
119
fi
120
120
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" )
123
123
124
124
125
125
# Check if the subject and artifact digests match.
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
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.
4
4
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
5
5
6
6
# This script runs the Macaron Docker image.
@@ -231,6 +231,10 @@ function mount_dir_rw_allow_create() {
231
231
# $1: The macaron argument from which the directory is passed into this script.
232
232
# $2: The path to the directory on the host.
233
233
# $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
234
238
function mount_dir_rw_forbid_create() {
235
239
arg_name=$1
236
240
dir_on_host=$2
You can’t perform that action at this time.
0 commit comments