Skip to content

Commit 52f3837

Browse files
reverted changes
1 parent eacf32a commit 52f3837

File tree

6 files changed

+19
-35
lines changed

6 files changed

+19
-35
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: CLI
1212
strategy:
1313
matrix:
14-
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
14+
os: [ 'ubuntu-latest', 'windows-latest', 'macos-13' ]
1515
runs-on: ${{ matrix.os }}
1616
steps:
1717
- name: Set git to use LF
@@ -24,22 +24,7 @@ jobs:
2424
- name: Set up Go
2525
uses: actions/setup-go@v5
2626
with:
27-
go-version: '1.23'
28-
29-
- name: Install PHP and Composer
30-
run: |
31-
if [ "$RUNNER_OS" == "Linux" ]; then
32-
sudo apt-get update
33-
sudo apt-get install -y php php-curl php-mbstring php-xml
34-
curl -sS https://getcomposer.org/installer | php
35-
sudo mv composer.phar /usr/local/bin/composer
36-
elif [ "$RUNNER_OS" == "macOS" ]; then
37-
brew install composer
38-
elif [ "$RUNNER_OS" == "Windows" ]; then
39-
choco install composer -y
40-
fi
41-
composer --version
42-
shell: bash
27+
go-version: '1.20'
4328

4429
- name: Install Bower
4530
run: |
@@ -90,7 +75,7 @@ jobs:
9075
- name: Set up Go
9176
uses: actions/setup-go@v5
9277
with:
93-
go-version: '1.23'
78+
go-version: '1.20'
9479

9580
- name: Pull Supported Formats
9681
run: |
@@ -152,12 +137,12 @@ jobs:
152137
- uses: actions/checkout@v4
153138
- uses: actions/setup-go@v5
154139
with:
155-
go-version: '1.23'
140+
go-version: '1.20'
156141
- name: Pull Supported Formats
157142
run: |
158143
cd cmd/debricked
159144
go generate -v -x
160145
- name: golangci-lint
161146
uses: golangci/golangci-lint-action@v4
162147
with:
163-
version: v1.62
148+
version: v1.52

internal/cmd/report/license/license.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func RunE(r report.IReporter) func(_ *cobra.Command, args []string) error {
4848
}
4949

5050
if err := r.Order(orderArgs); err != nil {
51-
return fmt.Errorf("%s\n", color.RedString("⨯")+" "+err.Error())
51+
return fmt.Errorf("%s %s\n", color.RedString("⨯"), err.Error())
5252
}
5353

5454
fmt.Printf("%s Successfully ordered license export\n", color.GreenString("✔"))

internal/cmd/report/sbom/sbom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func RunE(r report.IReporter) func(_ *cobra.Command, args []string) error {
8686
}
8787

8888
if err := r.Order(orderArgs); err != nil {
89-
return fmt.Errorf("%s", color.RedString("⨯")+" "+err.Error())
89+
return fmt.Errorf("%s %s", color.RedString("⨯"), err.Error())
9090
}
9191

9292
return nil

internal/cmd/report/vulnerability/vulnerability.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func RunE(r report.IReporter) func(_ *cobra.Command, args []string) error {
3838
return func(_ *cobra.Command, _ []string) error {
3939
orderArgs := vulnerability.OrderArgs{Email: viper.GetString(EmailFlag)}
4040
if err := r.Order(orderArgs); err != nil {
41-
return fmt.Errorf("%s\n", color.RedString("⨯")+" "+err.Error())
41+
return fmt.Errorf("%s %s\n", color.RedString("⨯"), err.Error())
4242
}
4343

4444
fmt.Printf("%s Successfully ordered vulnerability export\n", color.GreenString("✔"))

internal/cmd/scan/scan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ func RunE(s *scan.IScanner) func(_ *cobra.Command, args []string) error {
270270

271271
return scanCmdError
272272
} else if scanCmdError != nil {
273-
return fmt.Errorf("%s\n", color.RedString("⨯")+" "+scanCmdError.Error())
273+
return fmt.Errorf("%s %s\n", color.RedString("⨯"), scanCmdError.Error())
274274
}
275275

276276
return scanCmdError

internal/fingerprint/fingerprint.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -447,20 +447,19 @@ func inMemFingerprintZipContent(filename string, exclusions []string, inclusions
447447

448448
_, err = io.Copy(hasher, rc) // #nosec
449449
if err != nil {
450-
rc.Close()
450+
rc.Close()
451451

452-
return nil, err
453-
}
452+
return nil, err
453+
}
454454

455-
// #nosec G115 - UncompressedSize64 is always positive and within int64 range for valid zip files
456-
fingerprints = append(fingerprints, FileFingerprint{
457-
path: longFileName,
458-
contentLength: int64(f.UncompressedSize64),
459-
fingerprint: hasher.Sum(nil),
460-
})
455+
fingerprints = append(fingerprints, FileFingerprint{
456+
path: longFileName,
457+
contentLength: int64(f.UncompressedSize64),
458+
fingerprint: hasher.Sum(nil),
459+
})
461460

462-
rc.Close()
463-
}
461+
rc.Close()
462+
}
464463

465464
return fingerprints, nil
466465
}

0 commit comments

Comments
 (0)