pipechecker 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -198
- package/npm/pipechecker-darwin-arm64/pipechecker +0 -0
- package/npm/pipechecker-darwin-x64/pipechecker +0 -0
- package/npm/pipechecker-linux-arm64/pipechecker +0 -0
- package/npm/pipechecker-linux-x64/pipechecker +0 -0
- package/npm/pipechecker-x64.exe/pipechecker.exe +0 -0
- package/package.json +1 -1
- package/scripts/install.js +3 -3
package/README.md
CHANGED
|
@@ -1,206 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# PipeChecker
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://crates.io/crates/pipecheck)
|
|
5
|
-
[](https://www.npmjs.com/package/pipecheck)
|
|
6
|
-
[](LICENSE-MIT)
|
|
3
|
+
A Rust‑native CI/CD pipeline auditor that validates GitHub Actions, GitLab CI, and CircleCI workflows.
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Stop wasting time debugging CI failures. Pipecheck validates your GitHub Actions, GitLab CI, and CircleCI configurations locally, catching syntax errors, circular dependencies, and security issues instantly.
|
|
11
|
-
|
|
12
|
-
## 🚀 Quick Start
|
|
13
|
-
|
|
14
|
-
### Install via npm (recommended)
|
|
15
|
-
```bash
|
|
16
|
-
npm install -g pipecheck
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Install via Cargo
|
|
20
|
-
```bash
|
|
21
|
-
cargo install pipecheck
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Run
|
|
5
|
+
## Quick start
|
|
25
6
|
```bash
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
pipecheck .github/workflows/ci.yml
|
|
54
|
-
→ ❌ ERROR: Circular dependency detected: job-a -> job-c -> job-b
|
|
55
|
-
→ Fix immediately
|
|
56
|
-
→ git push with confidence ✅
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## 📖 Usage
|
|
60
|
-
|
|
61
|
-
### Quick Start
|
|
62
|
-
|
|
7
|
+
# Build and install (if not already built)
|
|
8
|
+
cargo install --path .
|
|
9
|
+
|
|
10
|
+
# Run the auditor on a repository (auto‑detects workflow files)
|
|
11
|
+
pipechecker --all
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## CLI flags
|
|
15
|
+
| Flag | Description |
|
|
16
|
+
|------|-------------|
|
|
17
|
+
| `--all` | Audit **all** workflow files in the repository |
|
|
18
|
+
| `--watch` | Watch files for changes and re‑run the audit |
|
|
19
|
+
| `--fix` | Attempt automatic fixes (e.g., pin unpinned actions) |
|
|
20
|
+
| `--tui` | Launch the interactive terminal UI |
|
|
21
|
+
| `--format json` | Output results as JSON |
|
|
22
|
+
| `--strict` | Treat warnings as errors |
|
|
23
|
+
| `--no-pinning` | Skip Docker image and action‑pinning checks |
|
|
24
|
+
|
|
25
|
+
## Symbols used in output
|
|
26
|
+
- `✅` – No issues found
|
|
27
|
+
- `⚠️` – **Warning** (non‑critical issue)
|
|
28
|
+
- `❌` – **Error** (must be addressed)
|
|
29
|
+
- `🔧` – Auto‑fix mode
|
|
30
|
+
|
|
31
|
+
## Testing
|
|
32
|
+
Run the full test suite:
|
|
63
33
|
```bash
|
|
64
|
-
|
|
65
|
-
pipecheck
|
|
66
|
-
|
|
67
|
-
# Check specific file
|
|
68
|
-
pipecheck .github/workflows/ci.yml
|
|
69
|
-
|
|
70
|
-
# Check all workflows
|
|
71
|
-
pipecheck --all
|
|
72
|
-
|
|
73
|
-
# Interactive TUI mode
|
|
74
|
-
pipecheck --tui
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### All Options
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
CI/CD Pipeline Auditor - Catch errors before you push
|
|
81
|
-
|
|
82
|
-
Usage: pipecheck [OPTIONS] [FILE]
|
|
83
|
-
|
|
84
|
-
Arguments:
|
|
85
|
-
[FILE] Path to pipeline configuration file (auto-detects if not provided)
|
|
86
|
-
|
|
87
|
-
Options:
|
|
88
|
-
-a, --all Check all workflow files in directory
|
|
89
|
-
--install-hook Install pre-commit hook
|
|
90
|
-
-w, --watch Watch for file changes and re-check
|
|
91
|
-
--fix Automatically fix issues where possible
|
|
92
|
-
--tui Interactive terminal UI mode
|
|
93
|
-
-f, --format <FORMAT> Output format (text, json) [default: text]
|
|
94
|
-
--no-docker Skip Docker image checks
|
|
95
|
-
-s, --strict Enable strict mode (warnings as errors)
|
|
96
|
-
-h, --help Print help
|
|
97
|
-
-V, --version Print version
|
|
34
|
+
cargo test
|
|
98
35
|
```
|
|
36
|
+
The repository includes unit tests for the auditors (syntax, DAG, secrets) to ensure future changes don’t re‑introduce bugs.
|
|
99
37
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
pipecheck --watch
|
|
108
|
-
|
|
109
|
-
# Interactive TUI mode
|
|
110
|
-
pipecheck --tui
|
|
111
|
-
|
|
112
|
-
# Auto-fix issues (Coming soon!)
|
|
113
|
-
pipecheck --fix
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### Configuration File
|
|
117
|
-
|
|
118
|
-
Create `.pipecheckrc.yml` in your project root:
|
|
119
|
-
|
|
120
|
-
```yaml
|
|
121
|
-
ignore:
|
|
122
|
-
- .github/workflows/old-*.yml
|
|
123
|
-
|
|
124
|
-
rules:
|
|
125
|
-
circular_dependencies: true
|
|
126
|
-
missing_secrets: true
|
|
127
|
-
docker_latest_tag: true
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Output Formats
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
# Text output (default)
|
|
134
|
-
pipecheck .github/workflows/ci.yml
|
|
135
|
-
|
|
136
|
-
# JSON output for CI integration
|
|
137
|
-
pipecheck .github/workflows/ci.yml --format json
|
|
138
|
-
|
|
139
|
-
# Strict mode (warnings as errors)
|
|
140
|
-
pipecheck .github/workflows/ci.yml --strict
|
|
141
|
-
|
|
142
|
-
# Skip Docker checks
|
|
143
|
-
pipecheck .github/workflows/ci.yml --no-docker
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## 📋 Example Output
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
Provider: GitHubActions
|
|
150
|
-
|
|
151
|
-
1 errors, 0 warnings
|
|
152
|
-
|
|
153
|
-
❌ ERROR: Circular dependency detected: job-a -> job-c -> job-b
|
|
154
|
-
💡 Remove one of the dependencies to break the cycle
|
|
155
|
-
|
|
156
|
-
ℹ️ INFO: Job 'build' uses secret: API_KEY
|
|
157
|
-
💡 Ensure this secret is configured in repository settings
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
## 🔧 Supported Platforms
|
|
161
|
-
|
|
162
|
-
| Platform | Status | File Pattern |
|
|
163
|
-
|----------|--------|--------------|
|
|
164
|
-
| **GitHub Actions** | ✅ Full Support | `.github/workflows/*.yml` |
|
|
165
|
-
| **GitLab CI** | ✅ Full Support | `.gitlab-ci.yml` |
|
|
166
|
-
| **CircleCI** | ✅ Full Support | `.circleci/config.yml` |
|
|
167
|
-
|
|
168
|
-
## 🏗️ Use in CI/CD
|
|
169
|
-
|
|
170
|
-
### GitHub Actions
|
|
171
|
-
```yaml
|
|
172
|
-
- name: Validate workflows
|
|
173
|
-
run: |
|
|
174
|
-
npm install -g pipecheck
|
|
175
|
-
pipecheck .github/workflows/*.yml --strict
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### GitLab CI
|
|
179
|
-
```yaml
|
|
180
|
-
validate:
|
|
181
|
-
script:
|
|
182
|
-
- cargo install pipecheck
|
|
183
|
-
- pipecheck .gitlab-ci.yml --strict
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### Pre-commit Hook
|
|
187
|
-
```bash
|
|
188
|
-
#!/bin/bash
|
|
189
|
-
pipecheck .github/workflows/*.yml --strict || exit 1
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## 🤝 Contributing
|
|
193
|
-
|
|
194
|
-
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
195
|
-
|
|
196
|
-
## 📝 License
|
|
197
|
-
|
|
198
|
-
Licensed under either of:
|
|
199
|
-
- MIT License ([LICENSE-MIT](LICENSE-MIT))
|
|
200
|
-
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
|
|
201
|
-
|
|
202
|
-
at your option.
|
|
38
|
+
## CI configuration
|
|
39
|
+
The GitHub Actions CI (`.github/workflows/ci.yml`) already runs:
|
|
40
|
+
- **Clippy** with `-D warnings`
|
|
41
|
+
- **rustfmt** checks
|
|
42
|
+
- **cargo audit** and **cargo deny** for security and licensing
|
|
43
|
+
- **Coverage** with `cargo tarpaulin`
|
|
44
|
+
- **Matrix builds** across Linux, macOS, and Windows, including cross‑compilation for `aarch64`.
|
|
203
45
|
|
|
204
|
-
|
|
46
|
+
The `network` feature (Docker image pinning) is exercised in the CI matrix via the `test` job, which builds the project with all optional features enabled.
|
|
205
47
|
|
|
206
|
-
|
|
48
|
+
## License
|
|
49
|
+
This project is licensed under either **MIT** or **Apache‑2.0** at your option. The `deny.toml` also includes **MPL‑2.0** and **Unicode‑3.0** as allowed licenses.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -62,7 +62,7 @@ async function install() {
|
|
|
62
62
|
|
|
63
63
|
// Check if binary already exists
|
|
64
64
|
if (fs.existsSync(binaryPath)) {
|
|
65
|
-
console.log('✓
|
|
65
|
+
console.log('✓ Pipechecker binary already installed');
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -78,7 +78,7 @@ async function install() {
|
|
|
78
78
|
try {
|
|
79
79
|
await download(url, binaryPath);
|
|
80
80
|
fs.chmodSync(binaryPath, 0o755);
|
|
81
|
-
console.log('✓
|
|
81
|
+
console.log('✓ Pipechecker installed successfully');
|
|
82
82
|
} catch (error) {
|
|
83
83
|
console.error(`Failed to download binary from ${url}`);
|
|
84
84
|
console.error('Falling back to building from source...');
|
|
@@ -89,7 +89,7 @@ async function install() {
|
|
|
89
89
|
process.platform === 'win32' ? 'pipechecker.exe' : 'pipechecker');
|
|
90
90
|
fs.copyFileSync(sourceBinary, binaryPath);
|
|
91
91
|
fs.chmodSync(binaryPath, 0o755);
|
|
92
|
-
console.log('✓
|
|
92
|
+
console.log('✓ Pipechecker installed from source');
|
|
93
93
|
} catch (buildError) {
|
|
94
94
|
console.error('Failed to build from source. Please ensure Rust is installed.');
|
|
95
95
|
console.error('Visit https://rustup.rs to install Rust');
|