devrail 0.1.0
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/LICENSE +21 -0
- package/README.md +273 -0
- package/dist/chunk-J22FFU7Z.js +575 -0
- package/dist/chunk-J22FFU7Z.js.map +1 -0
- package/dist/chunk-ZDEEHXE7.js +1298 -0
- package/dist/chunk-ZDEEHXE7.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +1346 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +312 -0
- package/dist/index.js +91 -0
- package/dist/index.js.map +1 -0
- package/dist/rules-XIWD4KI4.js +17 -0
- package/dist/rules-XIWD4KI4.js.map +1 -0
- package/package.json +88 -0
- package/templates/github-actions/vibeguard.yml +102 -0
- package/templates/gitlab-ci/vibeguard.yml +29 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "devrail",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Security & Quality Guardrails - Adoption-first developer discipline. Block new issues, accept existing ones with baseline mode.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./cli": {
|
|
15
|
+
"import": "./dist/cli/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"dr": "dist/cli/index.js",
|
|
20
|
+
"devrail": "dist/cli/index.js"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup",
|
|
24
|
+
"dev": "tsup --watch",
|
|
25
|
+
"test": "vitest",
|
|
26
|
+
"test:coverage": "vitest --coverage",
|
|
27
|
+
"lint": "eslint src --ext .ts",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"prepublishOnly": "npm run build && npm run typecheck"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"security",
|
|
33
|
+
"quality",
|
|
34
|
+
"guardrails",
|
|
35
|
+
"linting",
|
|
36
|
+
"testing",
|
|
37
|
+
"ci",
|
|
38
|
+
"devops",
|
|
39
|
+
"sast",
|
|
40
|
+
"baseline",
|
|
41
|
+
"devrail",
|
|
42
|
+
"code-quality",
|
|
43
|
+
"static-analysis",
|
|
44
|
+
"vulnerability-scanner",
|
|
45
|
+
"secrets-detection"
|
|
46
|
+
],
|
|
47
|
+
"author": "Devrail Team",
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"homepage": "https://github.com/lmelane/devrail#readme",
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/lmelane/devrail.git"
|
|
53
|
+
},
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/lmelane/devrail/issues"
|
|
56
|
+
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=18.0.0"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"chalk": "^5.3.0",
|
|
62
|
+
"commander": "^12.1.0",
|
|
63
|
+
"cosmiconfig": "^9.0.0",
|
|
64
|
+
"execa": "^9.3.0",
|
|
65
|
+
"glob": "^10.4.2",
|
|
66
|
+
"js-yaml": "^4.1.0",
|
|
67
|
+
"ora": "^8.0.1",
|
|
68
|
+
"semver": "^7.6.2",
|
|
69
|
+
"zod": "^3.23.8"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@types/js-yaml": "^4.0.9",
|
|
73
|
+
"@types/node": "^20.14.9",
|
|
74
|
+
"@types/semver": "^7.5.8",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^7.14.1",
|
|
76
|
+
"@typescript-eslint/parser": "^7.14.1",
|
|
77
|
+
"eslint": "^8.57.0",
|
|
78
|
+
"tsup": "^8.1.0",
|
|
79
|
+
"typescript": "^5.5.2",
|
|
80
|
+
"vitest": "^1.6.0"
|
|
81
|
+
},
|
|
82
|
+
"files": [
|
|
83
|
+
"dist",
|
|
84
|
+
"templates",
|
|
85
|
+
"presets",
|
|
86
|
+
"rules"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
name: VibeGuard Security & Quality
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master, develop]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
security-events: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
vibeguard:
|
|
15
|
+
name: Security & Quality Check
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout code
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
|
|
24
|
+
- name: Setup Node.js
|
|
25
|
+
uses: actions/setup-node@v4
|
|
26
|
+
with:
|
|
27
|
+
node-version: '20'
|
|
28
|
+
cache: 'npm'
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: npm ci
|
|
32
|
+
|
|
33
|
+
- name: Install VibeGuard
|
|
34
|
+
run: npm install -g vibeguard
|
|
35
|
+
|
|
36
|
+
- name: Install security tools
|
|
37
|
+
run: |
|
|
38
|
+
# Install gitleaks
|
|
39
|
+
GITLEAKS_VERSION="8.18.0"
|
|
40
|
+
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" | tar -xz
|
|
41
|
+
sudo mv gitleaks /usr/local/bin/
|
|
42
|
+
|
|
43
|
+
# Install osv-scanner
|
|
44
|
+
OSV_VERSION="1.7.0"
|
|
45
|
+
curl -sSfL "https://github.com/google/osv-scanner/releases/download/v${OSV_VERSION}/osv-scanner_linux_amd64" -o osv-scanner
|
|
46
|
+
chmod +x osv-scanner
|
|
47
|
+
sudo mv osv-scanner /usr/local/bin/
|
|
48
|
+
|
|
49
|
+
# Install semgrep
|
|
50
|
+
pip install semgrep
|
|
51
|
+
|
|
52
|
+
- name: Run VibeGuard Check
|
|
53
|
+
id: vibeguard
|
|
54
|
+
run: |
|
|
55
|
+
vg ci --format sarif > vibeguard-results.sarif || true
|
|
56
|
+
vg ci --format json > vibeguard-results.json || true
|
|
57
|
+
|
|
58
|
+
- name: Upload SARIF to GitHub Security
|
|
59
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
60
|
+
with:
|
|
61
|
+
sarif_file: vibeguard-results.sarif
|
|
62
|
+
if: always()
|
|
63
|
+
continue-on-error: true
|
|
64
|
+
|
|
65
|
+
- name: Upload results artifact
|
|
66
|
+
uses: actions/upload-artifact@v4
|
|
67
|
+
with:
|
|
68
|
+
name: vibeguard-results
|
|
69
|
+
path: |
|
|
70
|
+
vibeguard-results.sarif
|
|
71
|
+
vibeguard-results.json
|
|
72
|
+
if: always()
|
|
73
|
+
|
|
74
|
+
- name: VibeGuard CI (blocking)
|
|
75
|
+
run: vg ci --fail-on error
|
|
76
|
+
|
|
77
|
+
# Optional: Run on PR changes only (faster)
|
|
78
|
+
vibeguard-pr:
|
|
79
|
+
name: PR Quick Check
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
if: github.event_name == 'pull_request'
|
|
82
|
+
|
|
83
|
+
steps:
|
|
84
|
+
- name: Checkout code
|
|
85
|
+
uses: actions/checkout@v4
|
|
86
|
+
with:
|
|
87
|
+
fetch-depth: 0
|
|
88
|
+
|
|
89
|
+
- name: Setup Node.js
|
|
90
|
+
uses: actions/setup-node@v4
|
|
91
|
+
with:
|
|
92
|
+
node-version: '20'
|
|
93
|
+
cache: 'npm'
|
|
94
|
+
|
|
95
|
+
- name: Install dependencies
|
|
96
|
+
run: npm ci
|
|
97
|
+
|
|
98
|
+
- name: Install VibeGuard
|
|
99
|
+
run: npm install -g vibeguard
|
|
100
|
+
|
|
101
|
+
- name: Run quick check on changed files
|
|
102
|
+
run: vg check --changed
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
stages:
|
|
2
|
+
- security
|
|
3
|
+
|
|
4
|
+
vibeguard:
|
|
5
|
+
stage: security
|
|
6
|
+
image: node:20
|
|
7
|
+
before_script:
|
|
8
|
+
- npm ci
|
|
9
|
+
- npm install -g vibeguard
|
|
10
|
+
# Install gitleaks
|
|
11
|
+
- curl -sSfL https://github.com/gitleaks/gitleaks/releases/download/v8.18.0/gitleaks_8.18.0_linux_x64.tar.gz | tar -xz
|
|
12
|
+
- mv gitleaks /usr/local/bin/
|
|
13
|
+
# Install osv-scanner
|
|
14
|
+
- curl -sSfL https://github.com/google/osv-scanner/releases/download/v1.7.0/osv-scanner_linux_amd64 -o /usr/local/bin/osv-scanner
|
|
15
|
+
- chmod +x /usr/local/bin/osv-scanner
|
|
16
|
+
# Install semgrep
|
|
17
|
+
- pip install semgrep
|
|
18
|
+
script:
|
|
19
|
+
- vg ci --format json > vibeguard-results.json || true
|
|
20
|
+
- vg ci --fail-on error
|
|
21
|
+
artifacts:
|
|
22
|
+
when: always
|
|
23
|
+
paths:
|
|
24
|
+
- vibeguard-results.json
|
|
25
|
+
reports:
|
|
26
|
+
codequality: vibeguard-results.json
|
|
27
|
+
rules:
|
|
28
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
29
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|