Skip to content

Commit 4f94e9f

Browse files
authored
Update deps (#762)
1 parent 8de1d7d commit 4f94e9f

11 files changed

Lines changed: 631 additions & 688 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
repos:
22
- repo: https://github.com/gitleaks/gitleaks
3-
rev: v8.16.3
3+
rev: v8.30.0
44
hooks:
55
- id: gitleaks
66
- repo: https://github.com/golangci/golangci-lint
7-
rev: v1.52.2
7+
rev: v2.11.4
88
hooks:
99
- id: golangci-lint
1010
- repo: https://github.com/jumanjihouse/pre-commit-hooks
1111
rev: 3.0.0
1212
hooks:
1313
- id: shellcheck
1414
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.4.0
15+
rev: v6.0.0
1616
hooks:
1717
- id: end-of-file-fixer
1818
exclude: ^docs/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ docgen: ## Generate the docs
3232
go run ./docgen
3333
# some configuration variables use the user's home directory in their default values.
3434
# we want the documentation to just print $$HOME in these cases
35-
sed -i "s|${HOME}|"'$$HOME|g' docs/commands.md
35+
sed -i '' "s|${HOME}|"'$$HOME|g' docs/commands.md
3636

3737
help: ## Display this help screen
3838
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

cmd/config.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ func initConfig(rootCmd *cobra.Command, rootOptions *options.RootOptions) error
3333
if rootCmd.Flags().Lookup("config").Changed {
3434
return fmt.Errorf("config file %s does not exist", rootOptions.Config)
3535
} else {
36-
log.Debugf("%s does not exist, using command line arguments", rootOptions.Config)
37-
return nil
36+
// This is the deprecated behavior of loading this file by default, error out now
37+
if _, err := os.Stat(".witness.yaml"); err == nil {
38+
return fmt.Errorf("default use of .witness.yaml is deprecated, please specify the config file with --config or -c")
39+
}
3840
}
41+
42+
log.Debug("No config file found, using command line arguments")
43+
return nil
3944
}
4045

4146
v.SetConfigFile(rootOptions.Config)

cmd/verify.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func runVerify(ctx context.Context, vo options.VerifyOptions, verifiers ...crypt
143143
return fmt.Errorf("failed to parse intermediate CA certificate: %w", err)
144144
}
145145

146-
policyRoots = append(policyIntermediates, cert)
146+
policyIntermediates = append(policyIntermediates, cert)
147147
}
148148
}
149149

docgen/verify.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ cp docs/concepts/collection.md "$tmpdir/concepts/"
3131
go run ./docgen --dir "$tmpdir"
3232
# some configuration variables use the user's home directory in their default values.
3333
# we want the documentation to just print $HOME in these cases
34+
# shellcheck disable=SC2016
3435
sed -i "s|${HOME}|"'$HOME|g' "$tmpdir/commands.md"
3536
echo "###########################################"
3637
echo "If diffs are found, run: make docgen"

docs/attestors/secretscan.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,42 @@ The attestor uses [Gitleaks](https://github.com/zricethezav/gitleaks) to scan fo
1919

2020
When secrets are found, they are recorded in a structured format with the actual secret replaced by a DigestSet containing cryptographic hashes of the secret using all configured hash algorithms from the attestation context.
2121

22+
## SecretScan Attestor Examples
23+
24+
This section contains examples demonstrating the capabilities of the SecretScan attestor. You can find the demo script [here](https://github.com/in-toto/go-witness/blob/main/attestation/secretscan/examples/demo-encoded-secrets.sh)
25+
26+
### Demo Scripts
27+
28+
### `demo-encoded-secrets.sh`
29+
30+
This script demonstrates the multi-layer encoding detection capabilities of the secretscan attestor. It:
31+
32+
1. Creates test files with secrets in various encodings:
33+
- Plain text
34+
- Base64-encoded
35+
- Double base64-encoded
36+
- URL-encoded
37+
- Hex-encoded
38+
- Mixed encoding (base64 + URL)
39+
40+
2. Runs the witness CLI with the secretscan attestor on each file
41+
42+
3. Extracts and displays the findings from each attestation
43+
44+
### Running the Demo
45+
46+
```sh
47+
# Make sure the script is executable
48+
chmod +x demo-encoded-secrets.sh
49+
50+
# Run the demo
51+
./demo-encoded-secrets.sh
52+
```
53+
54+
## Additional Resources
55+
56+
For more information about the secretscan attestor, see the [main README](https://github.com/in-toto/go-witness/blob/main/attestation/secretscan/README.md) in the parent directory.
57+
2258
## Schema
2359
```json
2460
{
@@ -92,39 +128,3 @@ When secrets are found, they are recorded in a structured format with the actual
92128
}
93129
}
94130
```
95-
96-
# SecretScan Attestor Examples
97-
98-
This section contains examples demonstrating the capabilities of the SecretScan attestor. You can find the demo script [here](https://github.com/in-toto/go-witness/blob/main/attestation/secretscan/examples/demo-encoded-secrets.sh)
99-
100-
### Demo Scripts
101-
102-
### `demo-encoded-secrets.sh`
103-
104-
This script demonstrates the multi-layer encoding detection capabilities of the secretscan attestor. It:
105-
106-
1. Creates test files with secrets in various encodings:
107-
- Plain text
108-
- Base64-encoded
109-
- Double base64-encoded
110-
- URL-encoded
111-
- Hex-encoded
112-
- Mixed encoding (base64 + URL)
113-
114-
2. Runs the witness CLI with the secretscan attestor on each file
115-
116-
3. Extracts and displays the findings from each attestation
117-
118-
### Running the Demo
119-
120-
```sh
121-
# Make sure the script is executable
122-
chmod +x demo-encoded-secrets.sh
123-
124-
# Run the demo
125-
./demo-encoded-secrets.sh
126-
```
127-
128-
## Additional Resources
129-
130-
For more information about the secretscan attestor, see the [main README](https://github.com/in-toto/go-witness/blob/main/attestation/secretscan/README.md) in the parent directory.

0 commit comments

Comments
 (0)