Skip to content

Commit 1215545

Browse files
authored
chore(security): test plugins: harden security and update packages (#746)
1 parent 8dc0ff6 commit 1215545

91 files changed

Lines changed: 11167 additions & 7358 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ permissions:
348348
env:
349349
# Default versions for tooling
350350
DEFAULT_NODE_VERSION: "24"
351-
DEFAULT_GO_VERSION: "1.26"
351+
DEFAULT_GO_VERSION: "1.26.3"
352352
DEFAULT_GOLANGCI_LINT_VERSION: "2.11.4"
353353
DEFAULT_TRUFFLEHOG_VERSION: "3.94.3"
354354
DEFAULT_MAGE_VERSION: "1.17.1"

scripts/mockdata-dist-artifacts.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ cd "$(dirname "$0")/.."
1313
mkdir -p "tests/act/mockdata/dist-artifacts-unsigned/$1"
1414

1515
echo "[$1] Packaging os/arch ZIPs"
16+
17+
# Ensure that no signature token is set in order to produce unsigned ZIPs
18+
if [ -n "${GRAFANA_ACCESS_POLICY_TOKEN:-}" ]; then
19+
echo "Warning: GRAFANA_ACCESS_POLICY_TOKEN is set, unsetting it to produce unsigned ZIPs"
20+
fi
21+
unset GRAFANA_ACCESS_POLICY_TOKEN
22+
1623
# Will exit with 0 if the plugin has no backend
1724
# (in that case, there's no need for os/arch ZIPs, just universal)
1825
./actions/internal/plugins/package/package.sh "tests/act/mockdata/dist/$1" "tests/act/mockdata/dist-artifacts-unsigned/$1"

scripts/mockdata-dist.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ echo "Using Package Manager: $(pm)"
3333
echo "[$1] (frontend) Installing"
3434
$(pm) install
3535

36+
echo "[$1] (frontend) Lint + typecheck"
37+
$(pm) run lint
38+
$(pm) run typecheck
39+
3640
echo "[$1] (frontend) Building the plugin"
3741
$(pm) run build
3842

tests/act/main_tooling_versions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/stretchr/testify/require"
2020
)
2121

22-
var goVersionRegex = regexp.MustCompile(`^go\s+(\d+\.\d+)`)
22+
var goVersionRegex = regexp.MustCompile(`^go\s+(\d+\.\d+(?:\.\d+)?)`)
2323

2424
// readNodeMajorFromNvmrc reads the major Node.js version from an .nvmrc file.
2525
// It returns the major version string (e.g., "24").
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:37ff2c33368e6e3e6b67c9442adc4c59a6983da3b90713cd86d242b7183b50b0
3-
size 8865706
2+
oid sha256:75a382c902fa9c34479e4a1b5c79a5912f98c1bf3933a876973cb2cee908fb4f
3+
size 9211645
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
38530b26d7d9f58f47412e16021752a9
1+
419d1a455889ae0319a5fd4837d99f6d
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
46c03fbbcba159cfe963fcfa83b701ebb208cfc4
1+
a092a9752558e7e50b590110161331b16fc03aa1
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:4c690cd87a7e3b89dd021e5f4c231327487c975ef0e244b4f4f4dc896dcf65e1
3-
size 8175141
2+
oid sha256:1e670ff0e4c2d876bc337ef4d2bf5568c54a662f2cbaae9a1771ac2d136bd23f
3+
size 8478453
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cc0cfa48aec5d88376d4c7ac8ef186ec
1+
d10623adffa78f975a58ba4934a4372d
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
02760ee634554c7f9293a8ebc611b059bb42cb16
1+
00e72d059a73da6dd911c6ae570bc2a114876b9c

0 commit comments

Comments
 (0)