Skip to content

Commit d23925b

Browse files
committed
Update malcontent-samples references to chainguard-sandbox
The malcontent-samples repository was moved from chainguard-dev to chainguard-sandbox as part of the GitHub org reorganization. Updated references in: - Makefile - DEVELOPMENT.md - cmd/mal/mal.go - tests/samples_test.go - pkg/programkind/fuzz_test.go
1 parent 96faed5 commit d23925b

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Open the coverage report in a browser automatically:
4242

4343
Not every rule needs a test, but tests do ensure that a rules behavior stays consistent:
4444

45-
1. Add a sample to https://github.com/chainguard-dev/malcontent-samples
45+
1. Add a sample to https://github.com/chainguard-sandbox/malcontent-samples
4646
2. Create a directory within `test_data` using the same directory name as your sample:
4747

4848
```

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2024 Chainguard, Inc.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
SAMPLES_REPO ?= chainguard-dev/malcontent-samples
4+
SAMPLES_REPO ?= chainguard-sandbox/malcontent-samples
55
SAMPLES_COMMIT ?= f948cfd0f9d2a35a2452fe43ea4d094979652103
66

77
# BEGIN: lint-install ../malcontent

cmd/mal/mal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ func main() {
569569
Action: func(_ context.Context, _ *cli.Command) error {
570570
cfg := refresh.Config{
571571
Concurrency: runtime.NumCPU(),
572-
SamplesPath: "./out/chainguard-dev/malcontent-samples",
572+
SamplesPath: "./out/chainguard-sandbox/malcontent-samples",
573573
TestDataPath: "./tests",
574574
}
575575
if err := refresh.Refresh(ctx, cfg, log); err != nil {

pkg/programkind/fuzz_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// FuzzFile tests file type detection with random inputs.
1212
func FuzzFile(f *testing.F) {
13-
samplesDir := "../../out/chainguard-dev/malcontent-samples"
13+
samplesDir := "../../out/chainguard-sandbox/malcontent-samples"
1414
err := filepath.WalkDir(samplesDir, func(path string, d os.DirEntry, _ error) error {
1515
if d == nil || d.IsDir() {
1616
return nil

tests/samples_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ var (
4141

4242
func init() {
4343
flag.StringVar(&sampleDir, "sample_dir",
44-
"../out/chainguard-dev/malcontent-samples",
45-
"root directory of sample data, typically checked out from https://github.com/chainguard-dev/malcontent-samples via 'make integration'")
44+
"../out/chainguard-sandbox/malcontent-samples",
45+
"root directory of sample data, typically checked out from https://github.com/chainguard-sandbox/malcontent-samples via 'make integration'")
4646

4747
_, me, _, _ := runtime.Caller(0) //nolint:dogsled // don't need the rest
4848
testDataDir = filepath.Dir(me)
4949
fmt.Printf(">>> test data dir: %s\n", testDataDir)
5050
fmt.Printf(">>> sample data dir: %s\n", sampleDir)
5151

5252
if _, err := os.Stat(sampleDir); err != nil {
53-
fmt.Printf("samples directory %q does not exist - please use 'make integration' or git clone https://github.com/chainguard-dev/malcontent-samples appropriately. This path may be overridden by --sample_dir", sampleDir)
53+
fmt.Printf("samples directory %q does not exist - please use 'make integration' or git clone https://github.com/chainguard-sandbox/malcontent-samples appropriately. This path may be overridden by --sample_dir", sampleDir)
5454
os.Exit(1)
5555
}
5656

@@ -419,7 +419,7 @@ func TestDiffFileChange(t *testing.T) {
419419
MinRisk: tc.minResultScore,
420420
Renderer: simple,
421421
Rules: yrs,
422-
ScanPaths: []string{strings.TrimPrefix(tc.src, "../out/chainguard-dev/malcontent-samples/"), strings.TrimPrefix(tc.dest, "../out/chainguard-dev/malcontent-samples/")},
422+
ScanPaths: []string{strings.TrimPrefix(tc.src, "../out/chainguard-sandbox/malcontent-samples/"), strings.TrimPrefix(tc.dest, "../out/chainguard-sandbox/malcontent-samples/")},
423423
}
424424

425425
logger := clog.New(slog.Default().Handler()).With("src", tc.src)
@@ -486,7 +486,7 @@ func TestDiffFileIncrease(t *testing.T) {
486486
MinRisk: tc.minResultScore,
487487
Renderer: simple,
488488
Rules: yrs,
489-
ScanPaths: []string{strings.TrimPrefix(tc.src, "../out/chainguard-dev/malcontent-samples/"), strings.TrimPrefix(tc.dest, "../out/chainguard-dev/malcontent-samples/")},
489+
ScanPaths: []string{strings.TrimPrefix(tc.src, "../out/chainguard-sandbox/malcontent-samples/"), strings.TrimPrefix(tc.dest, "../out/chainguard-sandbox/malcontent-samples/")},
490490
}
491491

492492
logger := clog.New(slog.Default().Handler()).With("src", tc.src)

0 commit comments

Comments
 (0)