Skip to content

Commit e90a919

Browse files
committed
Bump version to 0.2.0; update build script and documentation for new features and improvements
1 parent 4eca161 commit e90a919

File tree

9 files changed

+170
-240
lines changed

9 files changed

+170
-240
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,14 @@ jobs:
3030

3131
- name: Build for all platforms
3232
run: |
33-
BUILD_DATE=$(date -u '+%Y-%m-%d %H:%M:%S UTC')
34-
GIT_COMMIT=$(git rev-parse --short HEAD)
35-
3633
# Build for Windows
37-
GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=${{ env.VERSION }} -X 'github.com/rafabd1/SecretHound/cmd.BuildDate=${BUILD_DATE}' -X github.com/rafabd1/SecretHound/cmd.GitCommit=${GIT_COMMIT}" -o secrethound-${{ env.VERSION }}-windows-amd64.exe ./cmd/secrethound/
34+
GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=${{ env.VERSION }}" -o secrethound-${{ env.VERSION }}-windows-amd64.exe ./cmd/secrethound/
3835
3936
# Build for Linux
40-
GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=${{ env.VERSION }} -X 'github.com/rafabd1/SecretHound/cmd.BuildDate=${BUILD_DATE}' -X github.com/rafabd1/SecretHound/cmd.GitCommit=${GIT_COMMIT}" -o secrethound-${{ env.VERSION }}-linux-amd64 ./cmd/secrethound/
37+
GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=${{ env.VERSION }}" -o secrethound-${{ env.VERSION }}-linux-amd64 ./cmd/secrethound/
4138
4239
# Build for macOS
43-
GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=${{ env.VERSION }} -X 'github.com/rafabd1/SecretHound/cmd.BuildDate=${BUILD_DATE}' -X github.com/rafabd1/SecretHound/cmd.GitCommit=${GIT_COMMIT}" -o secrethound-${{ env.VERSION }}-darwin-amd64 ./cmd/secrethound/
40+
GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=${{ env.VERSION }}" -o secrethound-${{ env.VERSION }}-darwin-amd64 ./cmd/secrethound/
4441
4542
- name: Create Release
4643
id: create_release
@@ -56,35 +53,41 @@ jobs:
5653
secrethound-${{ env.VERSION }}-linux-amd64
5754
secrethound-${{ env.VERSION }}-darwin-amd64
5855
body: |
59-
# SecretHound v${{ env.VERSION }}
60-
61-
## Improvements
62-
- Removed global execution timeout allowing scans to run without time constraints
63-
- Enhanced error logging with better visibility for critical errors
64-
- Improved log output reducing redundant messages and clarifying statistics
65-
- Fixed build information display in version command
66-
- Added proper build date and git commit tracking
67-
- Optimized progress display with cleaner output
68-
69-
## Bug Fixes
70-
- Fixed issue with timeout prematurely ending large scans
71-
- Resolved silent errors in verbose mode
72-
73-
## Installation
74-
75-
Download the appropriate binary for your platform and make it executable.
76-
77-
For Linux/macOS:
78-
```
79-
chmod +x secrethound-${{ env.VERSION }}-linux-amd64
80-
./secrethound-${{ env.VERSION }}-linux-amd64
81-
```
82-
83-
For Go users:
84-
```
85-
go install github.com/rafabd1/SecretHound/cmd/secrethound@latest
86-
```
87-
88-
## Documentation
89-
90-
See the [documentation](https://github.com/rafabd1/SecretHound/tree/main/docs) for details on usage.
56+
# SecretHound v${{ env.VERSION }}
57+
58+
## Improvements
59+
60+
- Added support for ignoring SSL/TLS certificate verification with `--insecure`
61+
- Complete overhaul of the regex pattern system
62+
- Added support for custom HTTP headers with `-H/--header`
63+
- Fixed timeout and concurrency issues
64+
- Fixed `-r/--retries` parameter that wasn't being applied
65+
- Reorganized patterns package for better maintenance
66+
- Redesigned error handling system
67+
- Temporarily disabled `--regex-file` option
68+
69+
## Bug Fixes
70+
71+
- Fixed issue with URLs having invalid certificates
72+
- Resolved timeout problems in large scans
73+
- Improved synchronization between threads to prevent resource leaks
74+
- Fixed false positive issues in certain regex patterns
75+
76+
## Installation
77+
78+
Download the appropriate binary for your platform and make it executable.
79+
80+
For Linux/macOS:
81+
```
82+
chmod +x secrethound-${{ env.VERSION }}-linux-amd64
83+
./secrethound-${{ env.VERSION }}-linux-amd64
84+
```
85+
86+
For Go users:
87+
```
88+
go install github.com/rafabd1/SecretHound/cmd/secrethound@latest
89+
```
90+
91+
## Documentation
92+
93+
See the [documentation](https://github.com/rafabd1/SecretHound/tree/main/docs) for usage details.

CHANGELOG.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
11
# SecretHound Changelog
22

3-
<<<<<<< HEAD
4-
## v0.1.2 (Unreleased)
3+
## v0.2.0 (2025-04-03)
54

65
### Improvements
7-
- Added 50+ new regex patterns for detecting additional types of secrets
8-
- Added support for Machine Learning service API keys (OpenAI, HuggingFace, Anthropic, etc.)
9-
- Added patterns for CI/CD and DevOps tools (Jenkins, CircleCI, Docker Hub, etc.)
10-
- Enhanced detection of database connection strings
11-
- Added exclusion patterns to reduce false positives
12-
- Organized patterns into logical categories
13-
- Updated documentation with comprehensive list of supported secrets
14-
15-
## v0.1.1 (2024-07-05)
16-
=======
6+
- Added support for skipping SSL/TLS certificate verification with `--insecure`
7+
- Complete redesign of the regex pattern system
8+
- Added support for custom HTTP headers with `-H/--header`
9+
- Fixed timeout and concurrency issues
10+
- Fixed `-r/--retries` parameter that wasn't being applied
11+
- Reorganized patterns package for better maintenance
12+
- Redesigned error handling system
13+
- Temporarily disabled `--regex-file` option
14+
15+
### Bug Fixes
16+
- Fixed issue with URLs having invalid certificates
17+
- Resolved timeout problems in large scans
18+
- Improved thread synchronization to prevent resource leaks
19+
- Fixed false positive issues in certain regex patterns
20+
21+
### Technical Changes
22+
- Added new error type for certificate issues
23+
- Improved HTTP response handling logic
24+
- Added utility functions for certificate validation
25+
- Optimized regex patterns for better performance and accuracy
26+
1727
## v0.1.1 (2025-03-28)
18-
>>>>>>> d5bcfdec4f2010ce44706453f011967cd40b343f
1928

2029
### Improvements
2130
- Removed global execution timeout allowing scans to run without time constraints

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
## Features
1919

2020
- **Multi-Source Scanning**: Process remote URLs, local files, and entire directories
21-
- **Intelligent Detection**: 100+ regex patterns to identify different types of secrets
21+
- **Intelligent Detection**: 50+ regex patterns to identify different types of secrets
2222
- **Concurrent Processing**: Fast multi-threaded architecture for efficient scanning
2323
- **Domain-Aware Scheduling**: Smart distribution of requests to avoid rate limiting
2424
- **WAF/Rate Limit Evasion**: Automatic detection and handling of security measures
2525
- **Context Analysis**: Reduces false positives by analyzing surrounding code
2626
- **Real-Time Progress**: Live updates with progress bar and statistics
27-
- **Multiple Output Formats**: Output to JSON or formatted text
27+
- **Multiple Output Formats**: Output to formatted text
2828

2929
## Installation
3030

@@ -109,7 +109,7 @@ SecretHound supports the following options:
109109
| `-n, --concurrency` | Number of concurrent workers | 10 |
110110
| `-l, --rate-limit` | Requests per second per domain (0 = auto) | 0 |
111111
| `-H, --header` | Custom HTTP header (format: 'Name: Value') | - |
112-
| `--regex-file` | File containing custom regex patterns | - |
112+
| `--insecure` | Disable SSL/TLS certificate verification | false |
113113
| `-v, --verbose` | Enable verbose output | false |
114114

115115
## Documentation

build.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
#!/bin/bash
22

33
# Build script for SecretHound
4-
VERSION="0.1.1"
5-
BUILD_DATE=$(date -u '+%Y-%m-%d %H:%M:%S UTC')
6-
GIT_COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
4+
VERSION="0.2.0"
75

86
# Display build info
97
echo "Building SecretHound $VERSION"
10-
echo "Build Date: $BUILD_DATE"
11-
echo "Git Commit: $GIT_COMMIT"
8+
echo "Platform: $(go env GOOS)/$(go env GOARCH)"
129

1310
# Build for current platform
1411
echo "Building for $(go env GOOS)/$(go env GOARCH)..."
15-
go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=$VERSION -X 'github.com/rafabd1/SecretHound/cmd.BuildDate=$BUILD_DATE' -X github.com/rafabd1/SecretHound/cmd.GitCommit=$GIT_COMMIT" -o secrethound ./cmd/secrethound/
12+
go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=$VERSION" -o secrethound ./cmd/secrethound/
1613

1714
echo "Build complete: $(pwd)/secrethound"
1815

@@ -24,13 +21,13 @@ if [ "$1" == "release" ]; then
2421
mkdir -p release
2522

2623
# Build for Windows
27-
GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=$VERSION -X 'github.com/rafabd1/SecretHound/cmd.BuildDate=$BUILD_DATE' -X github.com/rafabd1/SecretHound/cmd.GitCommit=$GIT_COMMIT" -o release/secrethound-$VERSION-windows-amd64.exe ./cmd/secrethound/
24+
GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=$VERSION" -o release/secrethound-$VERSION-windows-amd64.exe ./cmd/secrethound/
2825

2926
# Build for Linux
30-
GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=$VERSION -X 'github.com/rafabd1/SecretHound/cmd.BuildDate=$BUILD_DATE' -X github.com/rafabd1/SecretHound/cmd.GitCommit=$GIT_COMMIT" -o release/secrethound-$VERSION-linux-amd64 ./cmd/secrethound/
27+
GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=$VERSION" -o release/secrethound-$VERSION-linux-amd64 ./cmd/secrethound/
3128

3229
# Build for macOS
33-
GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=$VERSION -X 'github.com/rafabd1/SecretHound/cmd.BuildDate=$BUILD_DATE' -X github.com/rafabd1/SecretHound/cmd.GitCommit=$GIT_COMMIT" -o release/secrethound-$VERSION-darwin-amd64 ./cmd/secrethound/
30+
GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=$VERSION" -o release/secrethound-$VERSION-darwin-amd64 ./cmd/secrethound/
3431

3532
echo "Release builds complete in $(pwd)/release/"
3633
fi

cmd/version.go

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

1111
// Build information
1212
var (
13-
Version = "0.1.1"
14-
BuildDate = "undefined"
15-
GitCommit = "undefined"
13+
Version = "0.2.0"
1614
)
1715

1816
// versionCmd represents the version command
@@ -26,8 +24,6 @@ var versionCmd = &cobra.Command{
2624

2725
fmt.Println(cyan("SecretHound Version Information"))
2826
fmt.Printf("%s: %s\n", cyan("Version"), green(Version))
29-
fmt.Printf("%s: %s\n", cyan("Build Date"), green(BuildDate))
30-
fmt.Printf("%s: %s\n", cyan("Git Commit"), green(GitCommit))
3127
fmt.Printf("%s: %s\n", cyan("Go Version"), green(runtime.Version()))
3228
fmt.Printf("%s: %s/%s\n", cyan("Platform"), green(runtime.GOOS), green(runtime.GOARCH))
3329
},

docs/README.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ secrethound -i /path/to/directory
9797
Save results to a file:
9898

9999
```bash
100-
secrethound -i url-list.txt -o results.json
100+
secrethound -i url-list.txt -o results.txt
101101
```
102102

103103
## Command Line Options
104104

105-
The scan command supports the following options:
105+
SecretHound supports the following options:
106106

107107
| Flag | Description | Default |
108108
|------|-------------|---------|
@@ -112,7 +112,8 @@ The scan command supports the following options:
112112
| `-r, --retries` | Maximum number of retry attempts | 3 |
113113
| `-n, --concurrency` | Number of concurrent workers | 10 |
114114
| `-l, --rate-limit` | Requests per second per domain (0 = auto) | 0 |
115-
| `--regex-file` | File containing custom regex patterns | - |
115+
| `-H, --header` | Custom HTTP header (format: 'Name: Value') | - |
116+
| `--insecure` | Disable SSL/TLS certificate verification | false |
116117
| `-v, --verbose` | Enable verbose output | false |
117118

118119
## Input Sources
@@ -126,38 +127,17 @@ SecretHound can process various input sources:
126127

127128
Lists can be specified with the `-i` flag or by providing the filepath directly as an argument. URLs can be provided directly as arguments.
128129

129-
## Custom Regex Patterns
130-
131-
By default, SecretHound uses its built-in regex patterns to detect secrets. You can provide your own patterns by creating a file with the following format:
132-
133-
```
134-
REGEX_PATTERNS = {
135-
"name": "regex",
136-
"other": "other_regex"
137-
}
138-
```
139-
140-
Example:
141-
142-
```
143-
REGEX_PATTERNS = {
144-
"aws_key": "AKIA[0-9A-Z]{16}",
145-
"password": "(?i)password['\"]?\\s*[:=]\\s*['\"]([^'\"]+)['\"]"
146-
}
147-
```
148-
149-
A sample file is available in `examples/regex.txt`.
150-
151130
## Supported Patterns
152131

153-
SecretHound can detect dozens of different types of secrets, including:
132+
SecretHound can detect over 100 different types of secrets, including:
154133

155134
- API keys (Google, AWS, Firebase, etc.)
156135
- Access tokens (Facebook, Twitter, GitHub, etc.)
157136
- Credentials (passwords, Basic and Bearer tokens)
158137
- Private keys (RSA, SSH, PGP)
159138
- JWT tokens
160139
- Sensitive URLs (Firebase, AWS S3)
140+
- Database connection strings
161141
- And much more!
162142

163143
For a complete list of supported regexes, see the [Supported Secrets](SUPPORTED_SECRETS.md) document.

0 commit comments

Comments
 (0)