ossguard 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.
- ossguard-0.1.0/LICENSE +191 -0
- ossguard-0.1.0/PKG-INFO +193 -0
- ossguard-0.1.0/README.md +162 -0
- ossguard-0.1.0/pyproject.toml +53 -0
- ossguard-0.1.0/setup.cfg +4 -0
- ossguard-0.1.0/src/ossguard/__init__.py +3 -0
- ossguard-0.1.0/src/ossguard/analyzers/__init__.py +1 -0
- ossguard-0.1.0/src/ossguard/analyzers/audit.py +169 -0
- ossguard-0.1.0/src/ossguard/analyzers/badge.py +241 -0
- ossguard-0.1.0/src/ossguard/analyzers/baseline.py +521 -0
- ossguard-0.1.0/src/ossguard/analyzers/ci.py +379 -0
- ossguard-0.1.0/src/ossguard/analyzers/compare.py +203 -0
- ossguard-0.1.0/src/ossguard/analyzers/container.py +280 -0
- ossguard-0.1.0/src/ossguard/analyzers/dep_health.py +202 -0
- ossguard-0.1.0/src/ossguard/analyzers/drift.py +180 -0
- ossguard-0.1.0/src/ossguard/analyzers/fix.py +295 -0
- ossguard-0.1.0/src/ossguard/analyzers/fuzz.py +443 -0
- ossguard-0.1.0/src/ossguard/analyzers/insights.py +263 -0
- ossguard-0.1.0/src/ossguard/analyzers/license_check.py +236 -0
- ossguard-0.1.0/src/ossguard/analyzers/maturity.py +280 -0
- ossguard-0.1.0/src/ossguard/analyzers/pin.py +218 -0
- ossguard-0.1.0/src/ossguard/analyzers/policy.py +246 -0
- ossguard-0.1.0/src/ossguard/analyzers/reach.py +292 -0
- ossguard-0.1.0/src/ossguard/analyzers/report.py +235 -0
- ossguard-0.1.0/src/ossguard/analyzers/sbom_gen.py +210 -0
- ossguard-0.1.0/src/ossguard/analyzers/secrets.py +337 -0
- ossguard-0.1.0/src/ossguard/analyzers/slsa.py +217 -0
- ossguard-0.1.0/src/ossguard/analyzers/supply_chain.py +269 -0
- ossguard-0.1.0/src/ossguard/analyzers/tpn.py +240 -0
- ossguard-0.1.0/src/ossguard/analyzers/update.py +142 -0
- ossguard-0.1.0/src/ossguard/analyzers/watch.py +145 -0
- ossguard-0.1.0/src/ossguard/apis/__init__.py +6 -0
- ossguard-0.1.0/src/ossguard/apis/deps_dev.py +218 -0
- ossguard-0.1.0/src/ossguard/apis/osv.py +198 -0
- ossguard-0.1.0/src/ossguard/cli.py +2170 -0
- ossguard-0.1.0/src/ossguard/detector.py +212 -0
- ossguard-0.1.0/src/ossguard/generators/__init__.py +19 -0
- ossguard-0.1.0/src/ossguard/generators/branch_protection.py +73 -0
- ossguard-0.1.0/src/ossguard/generators/codeql.py +86 -0
- ossguard-0.1.0/src/ossguard/generators/dependabot.py +62 -0
- ossguard-0.1.0/src/ossguard/generators/sbom.py +64 -0
- ossguard-0.1.0/src/ossguard/generators/scorecard.py +61 -0
- ossguard-0.1.0/src/ossguard/generators/security_md.py +83 -0
- ossguard-0.1.0/src/ossguard/generators/sigstore.py +121 -0
- ossguard-0.1.0/src/ossguard/parsers/__init__.py +6 -0
- ossguard-0.1.0/src/ossguard/parsers/dependencies.py +388 -0
- ossguard-0.1.0/src/ossguard/parsers/sbom.py +148 -0
- ossguard-0.1.0/src/ossguard.egg-info/PKG-INFO +193 -0
- ossguard-0.1.0/src/ossguard.egg-info/SOURCES.txt +58 -0
- ossguard-0.1.0/src/ossguard.egg-info/dependency_links.txt +1 -0
- ossguard-0.1.0/src/ossguard.egg-info/entry_points.txt +2 -0
- ossguard-0.1.0/src/ossguard.egg-info/requires.txt +11 -0
- ossguard-0.1.0/src/ossguard.egg-info/top_level.txt +1 -0
- ossguard-0.1.0/tests/test_analyzers.py +422 -0
- ossguard-0.1.0/tests/test_analyzers_ext.py +323 -0
- ossguard-0.1.0/tests/test_analyzers_tier2.py +518 -0
- ossguard-0.1.0/tests/test_cli.py +95 -0
- ossguard-0.1.0/tests/test_detector.py +120 -0
- ossguard-0.1.0/tests/test_generators.py +130 -0
- ossguard-0.1.0/tests/test_parsers.py +237 -0
ossguard-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2025 OSSGuard Contributors
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
ossguard-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ossguard
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: One-command CLI to guard any OSS project with OpenSSF security best practices — bootstrap, scan, and monitor.
|
|
5
|
+
Author: OSSGuard Contributors
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/kirankotari/ossguard
|
|
8
|
+
Project-URL: Repository, https://github.com/kirankotari/ossguard
|
|
9
|
+
Project-URL: Issues, https://github.com/kirankotari/ossguard/issues
|
|
10
|
+
Keywords: openssf,security,supply-chain,scorecard,slsa,sbom,ossguard
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Security
|
|
16
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
17
|
+
Requires-Python: >=3.9
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: typer[all]>=0.9.0
|
|
21
|
+
Requires-Dist: rich>=13.0.0
|
|
22
|
+
Requires-Dist: pyyaml>=6.0
|
|
23
|
+
Requires-Dist: jinja2>=3.1.0
|
|
24
|
+
Requires-Dist: questionary>=2.0.0
|
|
25
|
+
Requires-Dist: httpx>=0.27.0
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
29
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# OSSGuard
|
|
33
|
+
|
|
34
|
+
**One CLI to guard any OSS project with OpenSSF security best practices — bootstrap, scan, and monitor.**
|
|
35
|
+
|
|
36
|
+
[](https://github.com/kirankotari/ossguard/actions/workflows/ci.yml)
|
|
37
|
+
[](LICENSE)
|
|
38
|
+
[](https://www.python.org/downloads/)
|
|
39
|
+
|
|
40
|
+
> *OSSGuard implements OpenSSF best practices and is intended for future contribution to the OpenSSF community.*
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## The Problem
|
|
45
|
+
|
|
46
|
+
The [OpenSSF](https://openssf.org/) ecosystem has 30+ excellent tools, frameworks, and guides for securing open source software — Scorecard, Sigstore, SLSA, SBOM, CodeQL, Dependabot, and more.
|
|
47
|
+
|
|
48
|
+
But setting them all up manually takes **hours**. And once set up, there's no unified way to monitor dependency health, track compliance, or assess supply-chain risk.
|
|
49
|
+
|
|
50
|
+
**OSSGuard** solves this with **26 commands** covering the full security lifecycle:
|
|
51
|
+
|
|
52
|
+
1. **Bootstrap** — set up all OpenSSF security configurations in one command
|
|
53
|
+
2. **Analyze** — audit security posture, dependencies, vulnerabilities, and compliance
|
|
54
|
+
3. **Remediate** — auto-fix issues, generate reports, and enforce policies
|
|
55
|
+
|
|
56
|
+
## Quick Start
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Install
|
|
60
|
+
pip install ossguard
|
|
61
|
+
|
|
62
|
+
# Bootstrap your project with all OpenSSF best practices
|
|
63
|
+
cd your-project
|
|
64
|
+
ossguard init
|
|
65
|
+
|
|
66
|
+
# Scan your project to see what's missing
|
|
67
|
+
ossguard scan
|
|
68
|
+
|
|
69
|
+
# Run a full security audit
|
|
70
|
+
ossguard audit
|
|
71
|
+
|
|
72
|
+
# Check OSPS Baseline compliance
|
|
73
|
+
ossguard baseline
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Commands
|
|
77
|
+
|
|
78
|
+
### Core
|
|
79
|
+
|
|
80
|
+
| Command | Description |
|
|
81
|
+
|---------|-------------|
|
|
82
|
+
| `ossguard init` | Bootstrap OpenSSF security configs (SECURITY.md, Scorecard, Dependabot, CodeQL, SBOM, Sigstore, branch protection) |
|
|
83
|
+
| `ossguard scan` | Read-only security posture scan |
|
|
84
|
+
| `ossguard version` | Show version |
|
|
85
|
+
|
|
86
|
+
### Dependency Analysis
|
|
87
|
+
|
|
88
|
+
| Command | Description |
|
|
89
|
+
|---------|-------------|
|
|
90
|
+
| `ossguard deps` | Dependency health analysis — vulns (OSV), outdated packages, risk scores (deps.dev) |
|
|
91
|
+
| `ossguard drift` | SBOM diff between releases — detect added, removed, and changed dependencies |
|
|
92
|
+
| `ossguard watch` | Continuous vulnerability monitoring from an SBOM (post-deployment watch) |
|
|
93
|
+
| `ossguard tpn` | Generate third-party notices from project dependencies |
|
|
94
|
+
|
|
95
|
+
### Security Analysis
|
|
96
|
+
|
|
97
|
+
| Command | Description |
|
|
98
|
+
|---------|-------------|
|
|
99
|
+
| `ossguard audit` | Comprehensive security audit (scan + deps + reachability combined) |
|
|
100
|
+
| `ossguard reach` | Filter vulnerabilities by runtime reachability (static import analysis) |
|
|
101
|
+
| `ossguard secrets` | Scan for leaked credentials and secrets (24 detection rules) |
|
|
102
|
+
|
|
103
|
+
### Compliance & Frameworks
|
|
104
|
+
|
|
105
|
+
| Command | Description |
|
|
106
|
+
|---------|-------------|
|
|
107
|
+
| `ossguard baseline` | Check against OSPS Security Baseline (34 controls, Levels 1-3) |
|
|
108
|
+
| `ossguard badge` | Assess readiness for the OpenSSF Best Practices Badge |
|
|
109
|
+
| `ossguard slsa` | Assess SLSA Build Level (Levels 1-4, 12 requirements) |
|
|
110
|
+
| `ossguard maturity` | S2C2F supply chain maturity assessment (22 practices, Levels 1-4) |
|
|
111
|
+
| `ossguard license` | Dependency license compliance and conflict detection |
|
|
112
|
+
| `ossguard policy` | Org-wide security policy enforcement (JSON config) |
|
|
113
|
+
|
|
114
|
+
### Supply Chain
|
|
115
|
+
|
|
116
|
+
| Command | Description |
|
|
117
|
+
|---------|-------------|
|
|
118
|
+
| `ossguard supply-chain` | Malicious package detection + typosquatting analysis |
|
|
119
|
+
| `ossguard pin` | Pin GitHub Actions to commit SHAs (resolve tags to full SHAs) |
|
|
120
|
+
| `ossguard update` | Security-prioritized dependency update suggestions |
|
|
121
|
+
|
|
122
|
+
### Generation
|
|
123
|
+
|
|
124
|
+
| Command | Description |
|
|
125
|
+
|---------|-------------|
|
|
126
|
+
| `ossguard insights` | Generate or validate SECURITY-INSIGHTS.yml |
|
|
127
|
+
| `ossguard sbom-gen` | Generate local SBOM (SPDX 2.3 or CycloneDX 1.5) |
|
|
128
|
+
| `ossguard ci` | Generate unified CI security pipeline (GitHub Actions) |
|
|
129
|
+
| `ossguard report` | Export HTML or JSON compliance report |
|
|
130
|
+
| `ossguard fuzz` | Fuzzing readiness check + starter harness generation (7 languages) |
|
|
131
|
+
|
|
132
|
+
### Container & Comparison
|
|
133
|
+
|
|
134
|
+
| Command | Description |
|
|
135
|
+
|---------|-------------|
|
|
136
|
+
| `ossguard container` | Dockerfile security linting (12 rules) |
|
|
137
|
+
| `ossguard compare` | Side-by-side security posture comparison of two projects |
|
|
138
|
+
| `ossguard fix` | Auto-remediate common security issues |
|
|
139
|
+
|
|
140
|
+
## Auto-Detection
|
|
141
|
+
|
|
142
|
+
OSSGuard automatically detects:
|
|
143
|
+
|
|
144
|
+
- **Languages**: Python, JavaScript/TypeScript, Go, Rust, Java, C/C++, Ruby, PHP, C#
|
|
145
|
+
- **Package Managers**: npm, yarn, pnpm, pip, poetry, cargo, go modules, maven, gradle
|
|
146
|
+
- **Frameworks**: React, Vue, Angular, Next.js, Django, Flask, FastAPI, Express
|
|
147
|
+
- **Existing Security Setup**: Won't overwrite existing configurations
|
|
148
|
+
|
|
149
|
+
## What `ossguard init` Generates
|
|
150
|
+
|
|
151
|
+
| File | Purpose | OpenSSF Reference |
|
|
152
|
+
|------|---------|-------------------|
|
|
153
|
+
| `SECURITY.md` | Vulnerability disclosure policy | [CVD Guide](https://github.com/ossf/oss-vulnerability-guide) |
|
|
154
|
+
| `.github/workflows/scorecard.yml` | Automated security scoring | [Scorecard](https://scorecard.dev/) |
|
|
155
|
+
| `.github/dependabot.yml` | Dependency update automation | [Best Practices](https://best.openssf.org/) |
|
|
156
|
+
| `.github/workflows/codeql.yml` | Code scanning for vulnerabilities | [Security Tooling WG](https://github.com/ossf/wg-security-tooling) |
|
|
157
|
+
| `.github/workflows/sbom.yml` | Software Bill of Materials generation | [SBOM Everywhere](https://github.com/ossf/sbom-everywhere) |
|
|
158
|
+
| `.github/workflows/sigstore.yml` | Cryptographic signing of releases | [Sigstore](https://sigstore.dev/) |
|
|
159
|
+
| `.github/BRANCH_PROTECTION.md` | Branch protection setup guide | [SCM Best Practices](https://best.openssf.org/SCM-BestPractices/) |
|
|
160
|
+
|
|
161
|
+
## How It Relates to OpenSSF
|
|
162
|
+
|
|
163
|
+
OSSGuard is **not** a replacement for any OpenSSF project. It's a **unifier** — it makes it trivially easy to adopt the best practices and tools that OpenSSF working groups have built:
|
|
164
|
+
|
|
165
|
+
- **Best Practices WG** — SECURITY.md template, Best Practices Badge assessment
|
|
166
|
+
- **Security Tooling WG** — CodeQL setup, SBOM generation, secret scanning
|
|
167
|
+
- **Supply Chain Integrity WG** — Sigstore signing, SLSA assessment, S2C2F maturity
|
|
168
|
+
- **Vulnerability Disclosures WG** — CVD-compliant SECURITY.md
|
|
169
|
+
- **Securing Software Repos WG** — Dependabot, branch protection, GitHub Actions pinning
|
|
170
|
+
- **OSPS Baseline** — Automated compliance checking across maturity levels
|
|
171
|
+
|
|
172
|
+
## Development
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# Clone and install
|
|
176
|
+
git clone https://github.com/kirankotari/ossguard.git
|
|
177
|
+
cd ossguard
|
|
178
|
+
pip install -e ".[dev]"
|
|
179
|
+
|
|
180
|
+
# Run tests
|
|
181
|
+
pytest
|
|
182
|
+
|
|
183
|
+
# Lint
|
|
184
|
+
ruff check src/ tests/
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Contributing
|
|
188
|
+
|
|
189
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
Apache-2.0 — see [LICENSE](LICENSE) for details.
|
ossguard-0.1.0/README.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# OSSGuard
|
|
2
|
+
|
|
3
|
+
**One CLI to guard any OSS project with OpenSSF security best practices — bootstrap, scan, and monitor.**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/kirankotari/ossguard/actions/workflows/ci.yml)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://www.python.org/downloads/)
|
|
8
|
+
|
|
9
|
+
> *OSSGuard implements OpenSSF best practices and is intended for future contribution to the OpenSSF community.*
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## The Problem
|
|
14
|
+
|
|
15
|
+
The [OpenSSF](https://openssf.org/) ecosystem has 30+ excellent tools, frameworks, and guides for securing open source software — Scorecard, Sigstore, SLSA, SBOM, CodeQL, Dependabot, and more.
|
|
16
|
+
|
|
17
|
+
But setting them all up manually takes **hours**. And once set up, there's no unified way to monitor dependency health, track compliance, or assess supply-chain risk.
|
|
18
|
+
|
|
19
|
+
**OSSGuard** solves this with **26 commands** covering the full security lifecycle:
|
|
20
|
+
|
|
21
|
+
1. **Bootstrap** — set up all OpenSSF security configurations in one command
|
|
22
|
+
2. **Analyze** — audit security posture, dependencies, vulnerabilities, and compliance
|
|
23
|
+
3. **Remediate** — auto-fix issues, generate reports, and enforce policies
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Install
|
|
29
|
+
pip install ossguard
|
|
30
|
+
|
|
31
|
+
# Bootstrap your project with all OpenSSF best practices
|
|
32
|
+
cd your-project
|
|
33
|
+
ossguard init
|
|
34
|
+
|
|
35
|
+
# Scan your project to see what's missing
|
|
36
|
+
ossguard scan
|
|
37
|
+
|
|
38
|
+
# Run a full security audit
|
|
39
|
+
ossguard audit
|
|
40
|
+
|
|
41
|
+
# Check OSPS Baseline compliance
|
|
42
|
+
ossguard baseline
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Commands
|
|
46
|
+
|
|
47
|
+
### Core
|
|
48
|
+
|
|
49
|
+
| Command | Description |
|
|
50
|
+
|---------|-------------|
|
|
51
|
+
| `ossguard init` | Bootstrap OpenSSF security configs (SECURITY.md, Scorecard, Dependabot, CodeQL, SBOM, Sigstore, branch protection) |
|
|
52
|
+
| `ossguard scan` | Read-only security posture scan |
|
|
53
|
+
| `ossguard version` | Show version |
|
|
54
|
+
|
|
55
|
+
### Dependency Analysis
|
|
56
|
+
|
|
57
|
+
| Command | Description |
|
|
58
|
+
|---------|-------------|
|
|
59
|
+
| `ossguard deps` | Dependency health analysis — vulns (OSV), outdated packages, risk scores (deps.dev) |
|
|
60
|
+
| `ossguard drift` | SBOM diff between releases — detect added, removed, and changed dependencies |
|
|
61
|
+
| `ossguard watch` | Continuous vulnerability monitoring from an SBOM (post-deployment watch) |
|
|
62
|
+
| `ossguard tpn` | Generate third-party notices from project dependencies |
|
|
63
|
+
|
|
64
|
+
### Security Analysis
|
|
65
|
+
|
|
66
|
+
| Command | Description |
|
|
67
|
+
|---------|-------------|
|
|
68
|
+
| `ossguard audit` | Comprehensive security audit (scan + deps + reachability combined) |
|
|
69
|
+
| `ossguard reach` | Filter vulnerabilities by runtime reachability (static import analysis) |
|
|
70
|
+
| `ossguard secrets` | Scan for leaked credentials and secrets (24 detection rules) |
|
|
71
|
+
|
|
72
|
+
### Compliance & Frameworks
|
|
73
|
+
|
|
74
|
+
| Command | Description |
|
|
75
|
+
|---------|-------------|
|
|
76
|
+
| `ossguard baseline` | Check against OSPS Security Baseline (34 controls, Levels 1-3) |
|
|
77
|
+
| `ossguard badge` | Assess readiness for the OpenSSF Best Practices Badge |
|
|
78
|
+
| `ossguard slsa` | Assess SLSA Build Level (Levels 1-4, 12 requirements) |
|
|
79
|
+
| `ossguard maturity` | S2C2F supply chain maturity assessment (22 practices, Levels 1-4) |
|
|
80
|
+
| `ossguard license` | Dependency license compliance and conflict detection |
|
|
81
|
+
| `ossguard policy` | Org-wide security policy enforcement (JSON config) |
|
|
82
|
+
|
|
83
|
+
### Supply Chain
|
|
84
|
+
|
|
85
|
+
| Command | Description |
|
|
86
|
+
|---------|-------------|
|
|
87
|
+
| `ossguard supply-chain` | Malicious package detection + typosquatting analysis |
|
|
88
|
+
| `ossguard pin` | Pin GitHub Actions to commit SHAs (resolve tags to full SHAs) |
|
|
89
|
+
| `ossguard update` | Security-prioritized dependency update suggestions |
|
|
90
|
+
|
|
91
|
+
### Generation
|
|
92
|
+
|
|
93
|
+
| Command | Description |
|
|
94
|
+
|---------|-------------|
|
|
95
|
+
| `ossguard insights` | Generate or validate SECURITY-INSIGHTS.yml |
|
|
96
|
+
| `ossguard sbom-gen` | Generate local SBOM (SPDX 2.3 or CycloneDX 1.5) |
|
|
97
|
+
| `ossguard ci` | Generate unified CI security pipeline (GitHub Actions) |
|
|
98
|
+
| `ossguard report` | Export HTML or JSON compliance report |
|
|
99
|
+
| `ossguard fuzz` | Fuzzing readiness check + starter harness generation (7 languages) |
|
|
100
|
+
|
|
101
|
+
### Container & Comparison
|
|
102
|
+
|
|
103
|
+
| Command | Description |
|
|
104
|
+
|---------|-------------|
|
|
105
|
+
| `ossguard container` | Dockerfile security linting (12 rules) |
|
|
106
|
+
| `ossguard compare` | Side-by-side security posture comparison of two projects |
|
|
107
|
+
| `ossguard fix` | Auto-remediate common security issues |
|
|
108
|
+
|
|
109
|
+
## Auto-Detection
|
|
110
|
+
|
|
111
|
+
OSSGuard automatically detects:
|
|
112
|
+
|
|
113
|
+
- **Languages**: Python, JavaScript/TypeScript, Go, Rust, Java, C/C++, Ruby, PHP, C#
|
|
114
|
+
- **Package Managers**: npm, yarn, pnpm, pip, poetry, cargo, go modules, maven, gradle
|
|
115
|
+
- **Frameworks**: React, Vue, Angular, Next.js, Django, Flask, FastAPI, Express
|
|
116
|
+
- **Existing Security Setup**: Won't overwrite existing configurations
|
|
117
|
+
|
|
118
|
+
## What `ossguard init` Generates
|
|
119
|
+
|
|
120
|
+
| File | Purpose | OpenSSF Reference |
|
|
121
|
+
|------|---------|-------------------|
|
|
122
|
+
| `SECURITY.md` | Vulnerability disclosure policy | [CVD Guide](https://github.com/ossf/oss-vulnerability-guide) |
|
|
123
|
+
| `.github/workflows/scorecard.yml` | Automated security scoring | [Scorecard](https://scorecard.dev/) |
|
|
124
|
+
| `.github/dependabot.yml` | Dependency update automation | [Best Practices](https://best.openssf.org/) |
|
|
125
|
+
| `.github/workflows/codeql.yml` | Code scanning for vulnerabilities | [Security Tooling WG](https://github.com/ossf/wg-security-tooling) |
|
|
126
|
+
| `.github/workflows/sbom.yml` | Software Bill of Materials generation | [SBOM Everywhere](https://github.com/ossf/sbom-everywhere) |
|
|
127
|
+
| `.github/workflows/sigstore.yml` | Cryptographic signing of releases | [Sigstore](https://sigstore.dev/) |
|
|
128
|
+
| `.github/BRANCH_PROTECTION.md` | Branch protection setup guide | [SCM Best Practices](https://best.openssf.org/SCM-BestPractices/) |
|
|
129
|
+
|
|
130
|
+
## How It Relates to OpenSSF
|
|
131
|
+
|
|
132
|
+
OSSGuard is **not** a replacement for any OpenSSF project. It's a **unifier** — it makes it trivially easy to adopt the best practices and tools that OpenSSF working groups have built:
|
|
133
|
+
|
|
134
|
+
- **Best Practices WG** — SECURITY.md template, Best Practices Badge assessment
|
|
135
|
+
- **Security Tooling WG** — CodeQL setup, SBOM generation, secret scanning
|
|
136
|
+
- **Supply Chain Integrity WG** — Sigstore signing, SLSA assessment, S2C2F maturity
|
|
137
|
+
- **Vulnerability Disclosures WG** — CVD-compliant SECURITY.md
|
|
138
|
+
- **Securing Software Repos WG** — Dependabot, branch protection, GitHub Actions pinning
|
|
139
|
+
- **OSPS Baseline** — Automated compliance checking across maturity levels
|
|
140
|
+
|
|
141
|
+
## Development
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Clone and install
|
|
145
|
+
git clone https://github.com/kirankotari/ossguard.git
|
|
146
|
+
cd ossguard
|
|
147
|
+
pip install -e ".[dev]"
|
|
148
|
+
|
|
149
|
+
# Run tests
|
|
150
|
+
pytest
|
|
151
|
+
|
|
152
|
+
# Lint
|
|
153
|
+
ruff check src/ tests/
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Contributing
|
|
157
|
+
|
|
158
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
Apache-2.0 — see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ossguard"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "One-command CLI to guard any OSS project with OpenSSF security best practices — bootstrap, scan, and monitor."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "Apache-2.0"}
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "OSSGuard Contributors"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["openssf", "security", "supply-chain", "scorecard", "slsa", "sbom", "ossguard"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: Apache Software License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Topic :: Security",
|
|
22
|
+
"Topic :: Software Development :: Build Tools",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"typer[all]>=0.9.0",
|
|
26
|
+
"rich>=13.0.0",
|
|
27
|
+
"pyyaml>=6.0",
|
|
28
|
+
"jinja2>=3.1.0",
|
|
29
|
+
"questionary>=2.0.0",
|
|
30
|
+
"httpx>=0.27.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
dev = [
|
|
35
|
+
"pytest>=7.0",
|
|
36
|
+
"pytest-cov>=4.0",
|
|
37
|
+
"ruff>=0.1.0",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
ossguard = "ossguard.cli:app"
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
Homepage = "https://github.com/kirankotari/ossguard"
|
|
45
|
+
Repository = "https://github.com/kirankotari/ossguard"
|
|
46
|
+
Issues = "https://github.com/kirankotari/ossguard/issues"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.packages.find]
|
|
49
|
+
where = ["src"]
|
|
50
|
+
|
|
51
|
+
[tool.ruff]
|
|
52
|
+
line-length = 100
|
|
53
|
+
target-version = "py39"
|
ossguard-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Analyzers for dependency health, SBOM drift, vulnerability monitoring, and more."""
|