wrg-devguard 0.1.0__tar.gz

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yakuphan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,197 @@
1
+ Metadata-Version: 2.4
2
+ Name: wrg-devguard
3
+ Version: 0.1.0
4
+ Summary: Developer-first AI safety checks: prompt-policy lint + secret scanning. Zero-dep CLI + GitHub Action + Claude Skill + Cursor Rule.
5
+ Author: Yakuphan Yucel
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/yakuphanycl/wrg-devguard
8
+ Project-URL: Repository, https://github.com/yakuphanycl/wrg-devguard
9
+ Project-URL: Issues, https://github.com/yakuphanycl/wrg-devguard/issues
10
+ Project-URL: Changelog, https://github.com/yakuphanycl/wrg-devguard/releases
11
+ Keywords: security,secret-scanning,policy-lint,ai-safety,prompt-security,devsecops,pre-commit,github-action,claude-skill,cursor-rule
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Security
20
+ Classifier: Topic :: Software Development :: Quality Assurance
21
+ Classifier: Topic :: Software Development :: Testing
22
+ Requires-Python: >=3.11
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Provides-Extra: yaml
26
+ Requires-Dist: PyYAML>=6.0; extra == "yaml"
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=8; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ # wrg-devguard
32
+
33
+ **Developer-first AI safety checks: prompt-policy lint + secret scanning.**
34
+
35
+ Zero-dependency Python CLI that scans a repository for two classes of issues
36
+ before your PR lands:
37
+
38
+ 1. **Leaked secrets** — API keys, private keys, tokens, common credential
39
+ formats in tracked files.
40
+ 2. **Prompt-policy violations** — deny-listed patterns in prompts, system
41
+ messages, and AI-facing text assets (configurable via JSON policy).
42
+
43
+ Ships as:
44
+
45
+ - A Python package (`pip install wrg-devguard`)
46
+ - A GitHub Action (drop-in composite action for any repo)
47
+ - A Claude Code skill (`.claude/skills/wrg-devguard/`)
48
+ - A Cursor rule (`.cursor/rules/wrg-devguard.mdc`)
49
+
50
+ No external dependencies in the core scanner (stdlib only). Optional `[yaml]`
51
+ extra for YAML policy files. Optional `bandit` subcommand for Python security
52
+ scanning.
53
+
54
+ ## Install
55
+
56
+ ```bash
57
+ pip install wrg-devguard
58
+ ```
59
+
60
+ For YAML policy support:
61
+
62
+ ```bash
63
+ pip install "wrg-devguard[yaml]"
64
+ ```
65
+
66
+ ## Quick start
67
+
68
+ ```bash
69
+ # Run both checks and fail on any high-severity finding
70
+ wrg-devguard check --path . --fail-on error
71
+
72
+ # Scan only for leaked secrets
73
+ wrg-devguard scan-secrets --path .
74
+
75
+ # Lint AI-facing text assets against a policy
76
+ wrg-devguard lint-policy --path . --profile strict
77
+
78
+ # Emit a JSON report for CI
79
+ wrg-devguard check --path . --json-out wrg-devguard-report.json
80
+ ```
81
+
82
+ ## GitHub Action
83
+
84
+ ```yaml
85
+ # .github/workflows/security.yml
86
+ name: security
87
+ on: [pull_request, push]
88
+
89
+ jobs:
90
+ wrg-devguard:
91
+ runs-on: ubuntu-latest
92
+ steps:
93
+ - uses: actions/checkout@v4
94
+ - uses: yakuphanycl/wrg-devguard@v1
95
+ with:
96
+ profile: strict
97
+ fail-on: error
98
+ ```
99
+
100
+ See [`action.yml`](./action.yml) for all inputs.
101
+
102
+ ## Claude Code skill
103
+
104
+ Drop the skill into your workspace:
105
+
106
+ ```bash
107
+ mkdir -p .claude/skills/wrg-devguard
108
+ curl -L https://raw.githubusercontent.com/yakuphanycl/wrg-devguard/main/.claude/skills/wrg-devguard/SKILL.md \
109
+ -o .claude/skills/wrg-devguard/SKILL.md
110
+ ```
111
+
112
+ Claude Code will surface the skill automatically when you ask things like
113
+ "scan for secrets", "is this safe to commit", or "check for leaks".
114
+
115
+ ## Cursor rule
116
+
117
+ Drop the rule into your workspace:
118
+
119
+ ```bash
120
+ mkdir -p .cursor/rules
121
+ curl -L https://raw.githubusercontent.com/yakuphanycl/wrg-devguard/main/.cursor/rules/wrg-devguard.mdc \
122
+ -o .cursor/rules/wrg-devguard.mdc
123
+ ```
124
+
125
+ Cursor will apply the rule before suggesting any `git commit` command.
126
+
127
+ ## Policy file
128
+
129
+ Default lookup order:
130
+
131
+ 1. `--policy <path>` argument if provided
132
+ 2. `.wrg/policy.json` at the repo root
133
+ 3. Built-in defaults
134
+
135
+ Profiles:
136
+
137
+ - `default` → PR-friendly baseline (recommended for CI)
138
+ - `strict` → stricter local/release audits (use `--profile strict`)
139
+
140
+ Place custom policies in `.wrg/policy.json` (JSON) or `.wrg/policy.yaml`
141
+ (requires `[yaml]` extra).
142
+
143
+ ## Commands
144
+
145
+ ```
146
+ wrg-devguard profiles # list available profiles
147
+ wrg-devguard lint-policy --path . # policy lint only
148
+ wrg-devguard scan-secrets --path . # secret scan only
149
+ wrg-devguard check --path . # both, single JSON report
150
+ wrg-devguard check --path . --profile strict
151
+ wrg-devguard check --path . --json-out report.json
152
+ wrg-devguard check --path . --fail-on warning
153
+ wrg-devguard check --path . --allowlist .wrg/allowlist.json
154
+ wrg-devguard bandit --path src/ # optional: bandit wrapper
155
+ ```
156
+
157
+ ## Exit codes
158
+
159
+ - `0` — no findings above threshold
160
+ - `1` — findings at or above `--fail-on` threshold
161
+ - `2` — configuration or input error
162
+
163
+ ## Why another secret scanner?
164
+
165
+ - **Zero runtime deps** — the core scanner is stdlib only, so `pip install` is
166
+ instant and works in any sandbox.
167
+ - **Policy lint in the same tool** — most scanners only do secrets. We also
168
+ catch prompt-policy violations (deny-listed patterns, hardcoded system
169
+ prompts, PII in AI-facing text).
170
+ - **AI-native UX** — ships with a Claude skill and a Cursor rule so the
171
+ scanner runs automatically inside your AI coding assistant, not just in CI.
172
+ - **Stable JSON schema** — `check --json-out` emits a versioned schema that
173
+ never breaks.
174
+
175
+ ## Development
176
+
177
+ ```bash
178
+ git clone https://github.com/yakuphanycl/wrg-devguard.git
179
+ cd wrg-devguard
180
+ pip install -e ".[dev]"
181
+ pytest -q
182
+ ```
183
+
184
+ ## License
185
+
186
+ MIT. See [LICENSE](./LICENSE).
187
+
188
+ ## Contributing
189
+
190
+ Issues and PRs welcome. For substantial changes, open an issue first to
191
+ discuss scope.
192
+
193
+ ---
194
+
195
+ Part of the [WinstonRedGuard](https://github.com/yakuphanycl/WinstonRedGuard)
196
+ ecosystem. The monorepo at `apps/wrg_devguard/` is the canonical source; this
197
+ repo is a distribution mirror kept in sync on every release.
@@ -0,0 +1,167 @@
1
+ # wrg-devguard
2
+
3
+ **Developer-first AI safety checks: prompt-policy lint + secret scanning.**
4
+
5
+ Zero-dependency Python CLI that scans a repository for two classes of issues
6
+ before your PR lands:
7
+
8
+ 1. **Leaked secrets** — API keys, private keys, tokens, common credential
9
+ formats in tracked files.
10
+ 2. **Prompt-policy violations** — deny-listed patterns in prompts, system
11
+ messages, and AI-facing text assets (configurable via JSON policy).
12
+
13
+ Ships as:
14
+
15
+ - A Python package (`pip install wrg-devguard`)
16
+ - A GitHub Action (drop-in composite action for any repo)
17
+ - A Claude Code skill (`.claude/skills/wrg-devguard/`)
18
+ - A Cursor rule (`.cursor/rules/wrg-devguard.mdc`)
19
+
20
+ No external dependencies in the core scanner (stdlib only). Optional `[yaml]`
21
+ extra for YAML policy files. Optional `bandit` subcommand for Python security
22
+ scanning.
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ pip install wrg-devguard
28
+ ```
29
+
30
+ For YAML policy support:
31
+
32
+ ```bash
33
+ pip install "wrg-devguard[yaml]"
34
+ ```
35
+
36
+ ## Quick start
37
+
38
+ ```bash
39
+ # Run both checks and fail on any high-severity finding
40
+ wrg-devguard check --path . --fail-on error
41
+
42
+ # Scan only for leaked secrets
43
+ wrg-devguard scan-secrets --path .
44
+
45
+ # Lint AI-facing text assets against a policy
46
+ wrg-devguard lint-policy --path . --profile strict
47
+
48
+ # Emit a JSON report for CI
49
+ wrg-devguard check --path . --json-out wrg-devguard-report.json
50
+ ```
51
+
52
+ ## GitHub Action
53
+
54
+ ```yaml
55
+ # .github/workflows/security.yml
56
+ name: security
57
+ on: [pull_request, push]
58
+
59
+ jobs:
60
+ wrg-devguard:
61
+ runs-on: ubuntu-latest
62
+ steps:
63
+ - uses: actions/checkout@v4
64
+ - uses: yakuphanycl/wrg-devguard@v1
65
+ with:
66
+ profile: strict
67
+ fail-on: error
68
+ ```
69
+
70
+ See [`action.yml`](./action.yml) for all inputs.
71
+
72
+ ## Claude Code skill
73
+
74
+ Drop the skill into your workspace:
75
+
76
+ ```bash
77
+ mkdir -p .claude/skills/wrg-devguard
78
+ curl -L https://raw.githubusercontent.com/yakuphanycl/wrg-devguard/main/.claude/skills/wrg-devguard/SKILL.md \
79
+ -o .claude/skills/wrg-devguard/SKILL.md
80
+ ```
81
+
82
+ Claude Code will surface the skill automatically when you ask things like
83
+ "scan for secrets", "is this safe to commit", or "check for leaks".
84
+
85
+ ## Cursor rule
86
+
87
+ Drop the rule into your workspace:
88
+
89
+ ```bash
90
+ mkdir -p .cursor/rules
91
+ curl -L https://raw.githubusercontent.com/yakuphanycl/wrg-devguard/main/.cursor/rules/wrg-devguard.mdc \
92
+ -o .cursor/rules/wrg-devguard.mdc
93
+ ```
94
+
95
+ Cursor will apply the rule before suggesting any `git commit` command.
96
+
97
+ ## Policy file
98
+
99
+ Default lookup order:
100
+
101
+ 1. `--policy <path>` argument if provided
102
+ 2. `.wrg/policy.json` at the repo root
103
+ 3. Built-in defaults
104
+
105
+ Profiles:
106
+
107
+ - `default` → PR-friendly baseline (recommended for CI)
108
+ - `strict` → stricter local/release audits (use `--profile strict`)
109
+
110
+ Place custom policies in `.wrg/policy.json` (JSON) or `.wrg/policy.yaml`
111
+ (requires `[yaml]` extra).
112
+
113
+ ## Commands
114
+
115
+ ```
116
+ wrg-devguard profiles # list available profiles
117
+ wrg-devguard lint-policy --path . # policy lint only
118
+ wrg-devguard scan-secrets --path . # secret scan only
119
+ wrg-devguard check --path . # both, single JSON report
120
+ wrg-devguard check --path . --profile strict
121
+ wrg-devguard check --path . --json-out report.json
122
+ wrg-devguard check --path . --fail-on warning
123
+ wrg-devguard check --path . --allowlist .wrg/allowlist.json
124
+ wrg-devguard bandit --path src/ # optional: bandit wrapper
125
+ ```
126
+
127
+ ## Exit codes
128
+
129
+ - `0` — no findings above threshold
130
+ - `1` — findings at or above `--fail-on` threshold
131
+ - `2` — configuration or input error
132
+
133
+ ## Why another secret scanner?
134
+
135
+ - **Zero runtime deps** — the core scanner is stdlib only, so `pip install` is
136
+ instant and works in any sandbox.
137
+ - **Policy lint in the same tool** — most scanners only do secrets. We also
138
+ catch prompt-policy violations (deny-listed patterns, hardcoded system
139
+ prompts, PII in AI-facing text).
140
+ - **AI-native UX** — ships with a Claude skill and a Cursor rule so the
141
+ scanner runs automatically inside your AI coding assistant, not just in CI.
142
+ - **Stable JSON schema** — `check --json-out` emits a versioned schema that
143
+ never breaks.
144
+
145
+ ## Development
146
+
147
+ ```bash
148
+ git clone https://github.com/yakuphanycl/wrg-devguard.git
149
+ cd wrg-devguard
150
+ pip install -e ".[dev]"
151
+ pytest -q
152
+ ```
153
+
154
+ ## License
155
+
156
+ MIT. See [LICENSE](./LICENSE).
157
+
158
+ ## Contributing
159
+
160
+ Issues and PRs welcome. For substantial changes, open an issue first to
161
+ discuss scope.
162
+
163
+ ---
164
+
165
+ Part of the [WinstonRedGuard](https://github.com/yakuphanycl/WinstonRedGuard)
166
+ ecosystem. The monorepo at `apps/wrg_devguard/` is the canonical source; this
167
+ repo is a distribution mirror kept in sync on every release.
@@ -0,0 +1,70 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "wrg-devguard"
7
+ version = "0.1.0"
8
+ description = "Developer-first AI safety checks: prompt-policy lint + secret scanning. Zero-dep CLI + GitHub Action + Claude Skill + Cursor Rule."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ authors = [
13
+ { name = "Yakuphan Yucel" },
14
+ ]
15
+ requires-python = ">=3.11"
16
+ keywords = [
17
+ "security",
18
+ "secret-scanning",
19
+ "policy-lint",
20
+ "ai-safety",
21
+ "prompt-security",
22
+ "devsecops",
23
+ "pre-commit",
24
+ "github-action",
25
+ "claude-skill",
26
+ "cursor-rule",
27
+ ]
28
+ classifiers = [
29
+ "Development Status :: 4 - Beta",
30
+ "Intended Audience :: Developers",
31
+ "Operating System :: OS Independent",
32
+ "Programming Language :: Python :: 3",
33
+ "Programming Language :: Python :: 3.11",
34
+ "Programming Language :: Python :: 3.12",
35
+ "Programming Language :: Python :: 3.13",
36
+ "Topic :: Security",
37
+ "Topic :: Software Development :: Quality Assurance",
38
+ "Topic :: Software Development :: Testing",
39
+ ]
40
+ dependencies = []
41
+
42
+ [project.optional-dependencies]
43
+ yaml = [
44
+ "PyYAML>=6.0",
45
+ ]
46
+ dev = [
47
+ "pytest>=8",
48
+ ]
49
+
50
+ [project.urls]
51
+ Homepage = "https://github.com/yakuphanycl/wrg-devguard"
52
+ Repository = "https://github.com/yakuphanycl/wrg-devguard"
53
+ Issues = "https://github.com/yakuphanycl/wrg-devguard/issues"
54
+ Changelog = "https://github.com/yakuphanycl/wrg-devguard/releases"
55
+
56
+ [project.scripts]
57
+ wrg-devguard = "wrg_devguard.cli:main"
58
+
59
+ [tool.setuptools]
60
+ package-dir = {"" = "src"}
61
+
62
+ [tool.setuptools.packages.find]
63
+ where = ["src"]
64
+
65
+ [tool.pytest.ini_options]
66
+ testpaths = ["tests"]
67
+ markers = [
68
+ "unit: isolated unit test (no network, no real services)",
69
+ "integration: exercises a real external service or SDK",
70
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,6 @@
1
+ """wrg_devguard package."""
2
+
3
+ from __future__ import annotations
4
+
5
+ __version__ = "0.1.0"
6
+