rossellforge-configward 0.2.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.
- rossellforge_configward-0.2.0/LICENSE +21 -0
- rossellforge_configward-0.2.0/PKG-INFO +87 -0
- rossellforge_configward-0.2.0/README.md +67 -0
- rossellforge_configward-0.2.0/configward.py +147 -0
- rossellforge_configward-0.2.0/pyproject.toml +34 -0
- rossellforge_configward-0.2.0/rossellforge_configward.egg-info/PKG-INFO +87 -0
- rossellforge_configward-0.2.0/rossellforge_configward.egg-info/SOURCES.txt +9 -0
- rossellforge_configward-0.2.0/rossellforge_configward.egg-info/dependency_links.txt +1 -0
- rossellforge_configward-0.2.0/rossellforge_configward.egg-info/entry_points.txt +2 -0
- rossellforge_configward-0.2.0/rossellforge_configward.egg-info/top_level.txt +1 -0
- rossellforge_configward-0.2.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RossellForge
|
|
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,87 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rossellforge-configward
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Local-first configuration linter for AI coding agents and MCP
|
|
5
|
+
Author: RossellForge
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/rossell93d-star/configward
|
|
8
|
+
Project-URL: Issues, https://github.com/rossell93d-star/configward/issues
|
|
9
|
+
Keywords: ai-agents,mcp,lint,developer-tools,configuration
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# ConfigWard
|
|
22
|
+
|
|
23
|
+
**Build smarter. Configure safer.**
|
|
24
|
+
|
|
25
|
+
[](https://github.com/rossell93d-star/configward/actions/workflows/tests.yml) [](LICENSE) [](pyproject.toml)
|
|
26
|
+
|
|
27
|
+
ConfigWard is an experimental, local-first configuration linter for AI coding agents. Inspect agent instructions, skill headers and selected MCP configurations before sharing or committing them. No API keys, runtime dependencies or network calls.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
Requires Python 3.11 or newer. Install from GitHub (Git is required):
|
|
32
|
+
|
|
33
|
+
~~~sh
|
|
34
|
+
python -m pip install git+https://github.com/rossell93d-star/configward.git
|
|
35
|
+
configward --version
|
|
36
|
+
configward .
|
|
37
|
+
~~~
|
|
38
|
+
|
|
39
|
+
Or clone the repository and install locally with `python -m pip install .`. PyPI publication is not yet available. No installation is needed to run `python configward.py .` from a checkout.
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
~~~sh
|
|
44
|
+
configward /path/to/project --json
|
|
45
|
+
configward . --strict
|
|
46
|
+
~~~
|
|
47
|
+
|
|
48
|
+
Example output from a synthetic project with an empty instruction file:
|
|
49
|
+
|
|
50
|
+
~~~text
|
|
51
|
+
ERROR EMPTY AGENTS.md:0: Configuration is empty.
|
|
52
|
+
1 file(s) checked; 1 finding(s).
|
|
53
|
+
~~~
|
|
54
|
+
|
|
55
|
+
## Supported checks (v0.1.0)
|
|
56
|
+
|
|
57
|
+
| Files | Checks |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| AGENTS.md, CLAUDE.md, GEMINI.md | Empty files, selected possible credentials |
|
|
60
|
+
| SKILL.md | Basic front matter and required fields |
|
|
61
|
+
| .mcp.json, mcp.json, mcp_config.json, claude_desktop_config.json | JSON syntax and common MCP server mapping shapes |
|
|
62
|
+
| .codex/config.toml | TOML syntax and selected MCP settings |
|
|
63
|
+
|
|
64
|
+
Findings include relative paths, rule IDs and severity. JSON is suitable for CI integrations. Exit code 0 means no errors; 1 means errors (or warnings in strict mode). Invalid directory arguments return 2. A clean run is not proof of security or compatibility.
|
|
65
|
+
|
|
66
|
+
## Design principles
|
|
67
|
+
|
|
68
|
+
- Local-first and read-only; never launches configured MCP servers.
|
|
69
|
+
- Conservative checks; never prints matched credential values.
|
|
70
|
+
- Bounded reads, ignored common dependency directories and no symlink traversal.
|
|
71
|
+
- Simple implementation with reproducible tests.
|
|
72
|
+
|
|
73
|
+
## Limitations
|
|
74
|
+
|
|
75
|
+
This alpha is not a full security scanner, YAML parser or complete client-specific schema validator. Credential heuristics can miss secrets or flag synthetic examples. Files outside supported names are not scanned. Review all findings manually. Use only on trusted local directories.
|
|
76
|
+
|
|
77
|
+
## Development and roadmap
|
|
78
|
+
|
|
79
|
+
Run `python -m unittest -v` to test the tool. See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md) before opening issues or pull requests.
|
|
80
|
+
|
|
81
|
+
- Versioned per-client schemas and richer skill validation.
|
|
82
|
+
- Cross-client compatibility reports and safe migration suggestions.
|
|
83
|
+
- SARIF output and additional synthetic fixtures.
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT. A [RossellForge](https://github.com/rossell93d-star) project.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# ConfigWard
|
|
2
|
+
|
|
3
|
+
**Build smarter. Configure safer.**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/rossell93d-star/configward/actions/workflows/tests.yml) [](LICENSE) [](pyproject.toml)
|
|
6
|
+
|
|
7
|
+
ConfigWard is an experimental, local-first configuration linter for AI coding agents. Inspect agent instructions, skill headers and selected MCP configurations before sharing or committing them. No API keys, runtime dependencies or network calls.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Requires Python 3.11 or newer. Install from GitHub (Git is required):
|
|
12
|
+
|
|
13
|
+
~~~sh
|
|
14
|
+
python -m pip install git+https://github.com/rossell93d-star/configward.git
|
|
15
|
+
configward --version
|
|
16
|
+
configward .
|
|
17
|
+
~~~
|
|
18
|
+
|
|
19
|
+
Or clone the repository and install locally with `python -m pip install .`. PyPI publication is not yet available. No installation is needed to run `python configward.py .` from a checkout.
|
|
20
|
+
|
|
21
|
+
## Quick start
|
|
22
|
+
|
|
23
|
+
~~~sh
|
|
24
|
+
configward /path/to/project --json
|
|
25
|
+
configward . --strict
|
|
26
|
+
~~~
|
|
27
|
+
|
|
28
|
+
Example output from a synthetic project with an empty instruction file:
|
|
29
|
+
|
|
30
|
+
~~~text
|
|
31
|
+
ERROR EMPTY AGENTS.md:0: Configuration is empty.
|
|
32
|
+
1 file(s) checked; 1 finding(s).
|
|
33
|
+
~~~
|
|
34
|
+
|
|
35
|
+
## Supported checks (v0.1.0)
|
|
36
|
+
|
|
37
|
+
| Files | Checks |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| AGENTS.md, CLAUDE.md, GEMINI.md | Empty files, selected possible credentials |
|
|
40
|
+
| SKILL.md | Basic front matter and required fields |
|
|
41
|
+
| .mcp.json, mcp.json, mcp_config.json, claude_desktop_config.json | JSON syntax and common MCP server mapping shapes |
|
|
42
|
+
| .codex/config.toml | TOML syntax and selected MCP settings |
|
|
43
|
+
|
|
44
|
+
Findings include relative paths, rule IDs and severity. JSON is suitable for CI integrations. Exit code 0 means no errors; 1 means errors (or warnings in strict mode). Invalid directory arguments return 2. A clean run is not proof of security or compatibility.
|
|
45
|
+
|
|
46
|
+
## Design principles
|
|
47
|
+
|
|
48
|
+
- Local-first and read-only; never launches configured MCP servers.
|
|
49
|
+
- Conservative checks; never prints matched credential values.
|
|
50
|
+
- Bounded reads, ignored common dependency directories and no symlink traversal.
|
|
51
|
+
- Simple implementation with reproducible tests.
|
|
52
|
+
|
|
53
|
+
## Limitations
|
|
54
|
+
|
|
55
|
+
This alpha is not a full security scanner, YAML parser or complete client-specific schema validator. Credential heuristics can miss secrets or flag synthetic examples. Files outside supported names are not scanned. Review all findings manually. Use only on trusted local directories.
|
|
56
|
+
|
|
57
|
+
## Development and roadmap
|
|
58
|
+
|
|
59
|
+
Run `python -m unittest -v` to test the tool. See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md) before opening issues or pull requests.
|
|
60
|
+
|
|
61
|
+
- Versioned per-client schemas and richer skill validation.
|
|
62
|
+
- Cross-client compatibility reports and safe migration suggestions.
|
|
63
|
+
- SARIF output and additional synthetic fixtures.
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
MIT. A [RossellForge](https://github.com/rossell93d-star) project.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"""ConfigWard: local, read-only checks for AI agent configuration files."""
|
|
2
|
+
import argparse
|
|
3
|
+
import json
|
|
4
|
+
import os
|
|
5
|
+
import re
|
|
6
|
+
import tomllib
|
|
7
|
+
from dataclasses import asdict, dataclass
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
__version__ = "0.2.0"
|
|
11
|
+
MARKDOWN = {"AGENTS.md", "CLAUDE.md", "GEMINI.md", "SKILL.md"}
|
|
12
|
+
JSON_CONFIG = {".mcp.json", "mcp.json", "mcp_config.json", "mcp-config.json", "claude_desktop_config.json"}
|
|
13
|
+
SKIP = {".git", "node_modules", ".venv", "venv", "__pycache__", "build", "dist"}
|
|
14
|
+
LIMIT = 1_000_000
|
|
15
|
+
SECRET = re.compile(r"-----BEGIN (?:[A-Z]+ )?PRIVATE KEY-----|\b(?:ghp_|github_pat_|sk-ant-|sk-proj-)[A-Za-z0-9_-]{20,}")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@dataclass(frozen=True)
|
|
19
|
+
class Finding:
|
|
20
|
+
path: str
|
|
21
|
+
code: str
|
|
22
|
+
severity: str
|
|
23
|
+
message: str
|
|
24
|
+
line: int = 0
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def audit(root):
|
|
28
|
+
root = Path(root).resolve()
|
|
29
|
+
if not root.is_dir():
|
|
30
|
+
raise ValueError("Expected an existing directory")
|
|
31
|
+
checked = 0
|
|
32
|
+
findings = []
|
|
33
|
+
for folder, dirs, names in os.walk(root, followlinks=False):
|
|
34
|
+
dirs[:] = sorted(d for d in dirs if d not in SKIP and not (Path(folder) / d).is_symlink())
|
|
35
|
+
for name in sorted(names):
|
|
36
|
+
path = Path(folder) / name
|
|
37
|
+
is_toml = name == "config.toml" and path.parent.name == ".codex"
|
|
38
|
+
is_gemini = name == "settings.json" and path.parent.name == ".gemini"
|
|
39
|
+
if name not in MARKDOWN | JSON_CONFIG and not (is_toml or is_gemini):
|
|
40
|
+
continue
|
|
41
|
+
if path.is_symlink() or not path.is_file():
|
|
42
|
+
continue
|
|
43
|
+
checked += 1
|
|
44
|
+
rel = path.relative_to(root).as_posix()
|
|
45
|
+
|
|
46
|
+
def add(code, message, line=0, severity="error"):
|
|
47
|
+
findings.append(Finding(rel, code, severity, message, line))
|
|
48
|
+
|
|
49
|
+
try:
|
|
50
|
+
with path.open("rb") as handle:
|
|
51
|
+
data = handle.read(LIMIT + 1)
|
|
52
|
+
if len(data) > LIMIT:
|
|
53
|
+
add("SIZE", "File exceeds inspection limit.", severity="warning")
|
|
54
|
+
continue
|
|
55
|
+
content = data.decode("utf-8-sig")
|
|
56
|
+
except (OSError, UnicodeError):
|
|
57
|
+
add("READ", "Could not read UTF-8 file.")
|
|
58
|
+
continue
|
|
59
|
+
if not content.strip():
|
|
60
|
+
add("EMPTY", "Configuration is empty.")
|
|
61
|
+
continue
|
|
62
|
+
for i, line in enumerate(content.splitlines(), 1):
|
|
63
|
+
if SECRET.search(line):
|
|
64
|
+
add("SECRET", "Possible embedded credential; review and rotate if real.", i)
|
|
65
|
+
if name == "SKILL.md":
|
|
66
|
+
lines = content.splitlines()
|
|
67
|
+
end = next((i for i in range(1, len(lines)) if lines[i].strip() == "---"), None)
|
|
68
|
+
if lines[0].strip() != "---" or end is None:
|
|
69
|
+
add("SKILL_HEADER", "Expected delimited front matter.")
|
|
70
|
+
else:
|
|
71
|
+
header = "\n".join(lines[1:end])
|
|
72
|
+
for field in ("name", "description"):
|
|
73
|
+
if not re.search(r"^" + field + r":[ \t]*\S", header, re.M):
|
|
74
|
+
add("SKILL_FIELD", "Expected nonempty " + field + " field.")
|
|
75
|
+
if name in JSON_CONFIG or is_toml or is_gemini:
|
|
76
|
+
try:
|
|
77
|
+
config = tomllib.loads(content) if is_toml else json.loads(content)
|
|
78
|
+
except ValueError:
|
|
79
|
+
add("SYNTAX", "Invalid JSON or TOML configuration.")
|
|
80
|
+
continue
|
|
81
|
+
if not isinstance(config, dict):
|
|
82
|
+
add("OBJECT", "Expected a configuration object.")
|
|
83
|
+
continue
|
|
84
|
+
servers = config.get("mcp_servers") if is_toml else config.get("mcpServers", config.get("servers"))
|
|
85
|
+
if servers is None and (is_toml or is_gemini):
|
|
86
|
+
continue
|
|
87
|
+
if not isinstance(servers, dict):
|
|
88
|
+
add("SERVERS", "No supported MCP server mapping found.", severity="warning")
|
|
89
|
+
continue
|
|
90
|
+
for server in servers.values():
|
|
91
|
+
if not isinstance(server, dict):
|
|
92
|
+
add("ENTRY", "MCP server entry must be an object.")
|
|
93
|
+
continue
|
|
94
|
+
if not any(isinstance(server.get(key), str) and server[key].strip() for key in ("command", "url", "httpUrl")):
|
|
95
|
+
add("TRANSPORT", "No recognized command or URL; check client format.", severity="warning")
|
|
96
|
+
if "args" in server and (not isinstance(server["args"], list) or not all(isinstance(arg, str) for arg in server["args"])):
|
|
97
|
+
add("ARGS", "MCP args must be an array of strings.")
|
|
98
|
+
for field in ("env", "headers", "http_headers"):
|
|
99
|
+
if field in server and not isinstance(server[field], dict):
|
|
100
|
+
add("MAPPING", "MCP " + field + " must be an object.")
|
|
101
|
+
if sum(isinstance(server.get(key), str) and bool(server[key].strip()) for key in ("command", "url", "httpUrl")) > 1:
|
|
102
|
+
add("MULTI_TRANSPORT", "Multiple transports defined; check client precedence.", severity="warning")
|
|
103
|
+
return checked, findings
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def to_sarif(findings):
|
|
107
|
+
from urllib.parse import quote
|
|
108
|
+
results = []
|
|
109
|
+
for finding in findings:
|
|
110
|
+
location = {"artifactLocation": {"uri": quote(finding.path, safe="/"), "uriBaseId": "%SRCROOT%"}}
|
|
111
|
+
if finding.line > 0:
|
|
112
|
+
location["region"] = {"startLine": finding.line}
|
|
113
|
+
results.append({"ruleId": finding.code, "level": finding.severity,
|
|
114
|
+
"message": {"text": finding.message},
|
|
115
|
+
"locations": [{"physicalLocation": location}]})
|
|
116
|
+
rules = [{"id": code} for code in sorted({f.code for f in findings})]
|
|
117
|
+
return {"$schema": "https://json.schemastore.org/sarif-2.1.0.json", "version": "2.1.0",
|
|
118
|
+
"runs": [{"tool": {"driver": {"name": "ConfigWard", "version": __version__, "rules": rules}},
|
|
119
|
+
"results": results}]}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def main(argv=None):
|
|
123
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
124
|
+
parser.add_argument("path", nargs="?", default=".")
|
|
125
|
+
formats = parser.add_mutually_exclusive_group()
|
|
126
|
+
formats.add_argument("--json", action="store_true", help="Machine-readable findings")
|
|
127
|
+
formats.add_argument("--sarif", action="store_true", help="SARIF 2.1.0 report")
|
|
128
|
+
parser.add_argument("--strict", action="store_true", help="Fail on warnings too")
|
|
129
|
+
parser.add_argument("--version", action="version", version=__version__)
|
|
130
|
+
args = parser.parse_args(argv)
|
|
131
|
+
try:
|
|
132
|
+
checked, findings = audit(args.path)
|
|
133
|
+
except ValueError as exc:
|
|
134
|
+
parser.error(str(exc))
|
|
135
|
+
if args.sarif:
|
|
136
|
+
print(json.dumps(to_sarif(findings), indent=2))
|
|
137
|
+
elif args.json:
|
|
138
|
+
print(json.dumps({"version": __version__, "files_checked": checked, "findings": [asdict(f) for f in findings]}, indent=2))
|
|
139
|
+
else:
|
|
140
|
+
for f in findings:
|
|
141
|
+
print(f"{f.severity.upper()} {f.code} {f.path}:{f.line}: {f.message}")
|
|
142
|
+
print(f"{checked} file(s) checked; {len(findings)} finding(s).")
|
|
143
|
+
return int(any(f.severity == "error" or args.strict for f in findings))
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
if __name__ == "__main__":
|
|
147
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "rossellforge-configward"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Local-first configuration linter for AI coding agents and MCP"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{name = "RossellForge"}]
|
|
13
|
+
keywords = ["ai-agents", "mcp", "lint", "developer-tools", "configuration"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
configward = "configward:main"
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://github.com/rossell93d-star/configward"
|
|
28
|
+
Issues = "https://github.com/rossell93d-star/configward/issues"
|
|
29
|
+
|
|
30
|
+
[tool.setuptools]
|
|
31
|
+
py-modules = ["configward"]
|
|
32
|
+
|
|
33
|
+
[tool.setuptools.dynamic]
|
|
34
|
+
version = {attr = "configward.__version__"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rossellforge-configward
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Local-first configuration linter for AI coding agents and MCP
|
|
5
|
+
Author: RossellForge
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/rossell93d-star/configward
|
|
8
|
+
Project-URL: Issues, https://github.com/rossell93d-star/configward/issues
|
|
9
|
+
Keywords: ai-agents,mcp,lint,developer-tools,configuration
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# ConfigWard
|
|
22
|
+
|
|
23
|
+
**Build smarter. Configure safer.**
|
|
24
|
+
|
|
25
|
+
[](https://github.com/rossell93d-star/configward/actions/workflows/tests.yml) [](LICENSE) [](pyproject.toml)
|
|
26
|
+
|
|
27
|
+
ConfigWard is an experimental, local-first configuration linter for AI coding agents. Inspect agent instructions, skill headers and selected MCP configurations before sharing or committing them. No API keys, runtime dependencies or network calls.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
Requires Python 3.11 or newer. Install from GitHub (Git is required):
|
|
32
|
+
|
|
33
|
+
~~~sh
|
|
34
|
+
python -m pip install git+https://github.com/rossell93d-star/configward.git
|
|
35
|
+
configward --version
|
|
36
|
+
configward .
|
|
37
|
+
~~~
|
|
38
|
+
|
|
39
|
+
Or clone the repository and install locally with `python -m pip install .`. PyPI publication is not yet available. No installation is needed to run `python configward.py .` from a checkout.
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
~~~sh
|
|
44
|
+
configward /path/to/project --json
|
|
45
|
+
configward . --strict
|
|
46
|
+
~~~
|
|
47
|
+
|
|
48
|
+
Example output from a synthetic project with an empty instruction file:
|
|
49
|
+
|
|
50
|
+
~~~text
|
|
51
|
+
ERROR EMPTY AGENTS.md:0: Configuration is empty.
|
|
52
|
+
1 file(s) checked; 1 finding(s).
|
|
53
|
+
~~~
|
|
54
|
+
|
|
55
|
+
## Supported checks (v0.1.0)
|
|
56
|
+
|
|
57
|
+
| Files | Checks |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| AGENTS.md, CLAUDE.md, GEMINI.md | Empty files, selected possible credentials |
|
|
60
|
+
| SKILL.md | Basic front matter and required fields |
|
|
61
|
+
| .mcp.json, mcp.json, mcp_config.json, claude_desktop_config.json | JSON syntax and common MCP server mapping shapes |
|
|
62
|
+
| .codex/config.toml | TOML syntax and selected MCP settings |
|
|
63
|
+
|
|
64
|
+
Findings include relative paths, rule IDs and severity. JSON is suitable for CI integrations. Exit code 0 means no errors; 1 means errors (or warnings in strict mode). Invalid directory arguments return 2. A clean run is not proof of security or compatibility.
|
|
65
|
+
|
|
66
|
+
## Design principles
|
|
67
|
+
|
|
68
|
+
- Local-first and read-only; never launches configured MCP servers.
|
|
69
|
+
- Conservative checks; never prints matched credential values.
|
|
70
|
+
- Bounded reads, ignored common dependency directories and no symlink traversal.
|
|
71
|
+
- Simple implementation with reproducible tests.
|
|
72
|
+
|
|
73
|
+
## Limitations
|
|
74
|
+
|
|
75
|
+
This alpha is not a full security scanner, YAML parser or complete client-specific schema validator. Credential heuristics can miss secrets or flag synthetic examples. Files outside supported names are not scanned. Review all findings manually. Use only on trusted local directories.
|
|
76
|
+
|
|
77
|
+
## Development and roadmap
|
|
78
|
+
|
|
79
|
+
Run `python -m unittest -v` to test the tool. See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md) before opening issues or pull requests.
|
|
80
|
+
|
|
81
|
+
- Versioned per-client schemas and richer skill validation.
|
|
82
|
+
- Cross-client compatibility reports and safe migration suggestions.
|
|
83
|
+
- SARIF output and additional synthetic fixtures.
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT. A [RossellForge](https://github.com/rossell93d-star) project.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
configward.py
|
|
4
|
+
pyproject.toml
|
|
5
|
+
rossellforge_configward.egg-info/PKG-INFO
|
|
6
|
+
rossellforge_configward.egg-info/SOURCES.txt
|
|
7
|
+
rossellforge_configward.egg-info/dependency_links.txt
|
|
8
|
+
rossellforge_configward.egg-info/entry_points.txt
|
|
9
|
+
rossellforge_configward.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
configward
|