sf-smartpangolin 3.0.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.
Files changed (66) hide show
  1. sf_smartpangolin-3.0.0/.gitignore +57 -0
  2. sf_smartpangolin-3.0.0/CHANGELOG.md +69 -0
  3. sf_smartpangolin-3.0.0/LICENSE +200 -0
  4. sf_smartpangolin-3.0.0/NOTICE +16 -0
  5. sf_smartpangolin-3.0.0/PKG-INFO +279 -0
  6. sf_smartpangolin-3.0.0/README.md +238 -0
  7. sf_smartpangolin-3.0.0/adapters/github-action/action.yml +47 -0
  8. sf_smartpangolin-3.0.0/adapters/go/README.md +57 -0
  9. sf_smartpangolin-3.0.0/adapters/java/README.md +41 -0
  10. sf_smartpangolin-3.0.0/adapters/node/README.md +33 -0
  11. sf_smartpangolin-3.0.0/bootstrap/README.md +8 -0
  12. sf_smartpangolin-3.0.0/build/README.md +8 -0
  13. sf_smartpangolin-3.0.0/demo/repo/README.md +1 -0
  14. sf_smartpangolin-3.0.0/docs/ci-integration.md +67 -0
  15. sf_smartpangolin-3.0.0/docs/cli.md +77 -0
  16. sf_smartpangolin-3.0.0/docs/design.md +85 -0
  17. sf_smartpangolin-3.0.0/docs/ecosystem.md +33 -0
  18. sf_smartpangolin-3.0.0/docs/faq.md +36 -0
  19. sf_smartpangolin-3.0.0/docs/index.md +30 -0
  20. sf_smartpangolin-3.0.0/docs/pii.md +40 -0
  21. sf_smartpangolin-3.0.0/docs/policy.md +109 -0
  22. sf_smartpangolin-3.0.0/docs/porting.md +89 -0
  23. sf_smartpangolin-3.0.0/docs/secret-folder-standard.md +57 -0
  24. sf_smartpangolin-3.0.0/examples/.pangolin.json +9 -0
  25. sf_smartpangolin-3.0.0/examples/github-actions-release.yml +20 -0
  26. sf_smartpangolin-3.0.0/examples/patches_config.json +5 -0
  27. sf_smartpangolin-3.0.0/examples/pre-commit-config.example.yaml +6 -0
  28. sf_smartpangolin-3.0.0/examples/usage.md +9 -0
  29. sf_smartpangolin-3.0.0/integrations/README.md +16 -0
  30. sf_smartpangolin-3.0.0/integrations/flowise/README.md +3 -0
  31. sf_smartpangolin-3.0.0/integrations/vscode/README.md +3 -0
  32. sf_smartpangolin-3.0.0/kits/README.md +45 -0
  33. sf_smartpangolin-3.0.0/kits/function-calling/README.md +7 -0
  34. sf_smartpangolin-3.0.0/kits/langchain/README.md +8 -0
  35. sf_smartpangolin-3.0.0/kits/llamaindex/README.md +8 -0
  36. sf_smartpangolin-3.0.0/kits/mcp/README.md +35 -0
  37. sf_smartpangolin-3.0.0/kits/precommit/README.md +9 -0
  38. sf_smartpangolin-3.0.0/ports/README.md +41 -0
  39. sf_smartpangolin-3.0.0/ports/go/README.md +12 -0
  40. sf_smartpangolin-3.0.0/ports/java/README.md +22 -0
  41. sf_smartpangolin-3.0.0/ports/node/LICENSE +200 -0
  42. sf_smartpangolin-3.0.0/ports/node/README.md +22 -0
  43. sf_smartpangolin-3.0.0/ports/php/LICENSE +200 -0
  44. sf_smartpangolin-3.0.0/ports/php/README.md +14 -0
  45. sf_smartpangolin-3.0.0/pyproject.toml +91 -0
  46. sf_smartpangolin-3.0.0/src/sf_smartpangolin/__init__.py +54 -0
  47. sf_smartpangolin-3.0.0/src/sf_smartpangolin/__main__.py +6 -0
  48. sf_smartpangolin-3.0.0/src/sf_smartpangolin/_version.py +2 -0
  49. sf_smartpangolin-3.0.0/src/sf_smartpangolin/api.py +227 -0
  50. sf_smartpangolin-3.0.0/src/sf_smartpangolin/bootstrap.py +62 -0
  51. sf_smartpangolin-3.0.0/src/sf_smartpangolin/cli.py +333 -0
  52. sf_smartpangolin-3.0.0/src/sf_smartpangolin/core.py +94 -0
  53. sf_smartpangolin-3.0.0/src/sf_smartpangolin/data/manifest.schema.json +64 -0
  54. sf_smartpangolin-3.0.0/src/sf_smartpangolin/engine.py +1045 -0
  55. sf_smartpangolin-3.0.0/src/sf_smartpangolin/folder_structure.py +148 -0
  56. sf_smartpangolin-3.0.0/src/sf_smartpangolin/gitignore.py +147 -0
  57. sf_smartpangolin-3.0.0/src/sf_smartpangolin/mcp.py +162 -0
  58. sf_smartpangolin-3.0.0/src/sf_smartpangolin/models.py +21 -0
  59. sf_smartpangolin-3.0.0/src/sf_smartpangolin/pii.py +94 -0
  60. sf_smartpangolin-3.0.0/src/sf_smartpangolin/triage.py +71 -0
  61. sf_smartpangolin-3.0.0/tests/fixtures/.gitkeep +0 -0
  62. sf_smartpangolin-3.0.0/tests/test_gitignore.py +70 -0
  63. sf_smartpangolin-3.0.0/tests/test_pangolin.py +150 -0
  64. sf_smartpangolin-3.0.0/tests/test_pii.py +40 -0
  65. sf_smartpangolin-3.0.0/tests/test_redteam.py +31 -0
  66. sf_smartpangolin-3.0.0/tests/test_smartpangolin.py +8 -0
@@ -0,0 +1,57 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .eggs/
5
+ # NOTE: this project ships a real `build/` content folder (build-all scripts) and
6
+ # builds with hatchling (output goes to dist/), so we do NOT ignore build/.
7
+ dist/
8
+ .venv/
9
+ venv/
10
+ ft-venv/
11
+ env/
12
+ .pytest_cache/
13
+ .mypy_cache/
14
+ .ruff_cache/
15
+ .coverage
16
+ htmlcov/
17
+ # SmartPangolin's own generated artifacts live one level up, but ignore them if run in-tree:
18
+ extracted_source/
19
+ share_archive/
20
+ file_folder_tree.txt
21
+ file_folder_path.txt
22
+ # Never commit real secrets:
23
+ .env
24
+ .secret/
25
+ !.secret/.gitignore
26
+ # ...except the intentional demo fixture that the scanner demo relies on:
27
+ !demo/repo/.env
28
+
29
+ # secrets and credentials never belong in the repository
30
+ .secure/
31
+ secrets.env
32
+ *.env
33
+ .env.*
34
+ !.env.example
35
+ .npmrc
36
+ .pypirc
37
+ .netrc
38
+ _netrc
39
+ id_rsa*
40
+ id_ed25519*
41
+ *.key
42
+ *.pem
43
+ *.p12
44
+ *.pfx
45
+
46
+ # port build output
47
+ *.class
48
+ ports/java/out/
49
+ ports/go/pangolin-check
50
+ ports/go/pangolincheck
51
+
52
+ # test and demo fixtures (fake values) that are tracked on purpose
53
+ !demo/repo/.env
54
+ !demo/repo/deploy/id_rsa
55
+
56
+ # binary from `go build` in ports/go (the module path ends in /go)
57
+ ports/go/go
@@ -0,0 +1,69 @@
1
+ # Changelog
2
+
3
+ All notable changes to SmartPangolin are documented here. Format follows
4
+ [Keep a Changelog](https://keepachangelog.com/); versioning is semantic.
5
+
6
+ ## Unreleased
7
+
8
+ ### Security
9
+ - Install instructions no longer name packages the maintainers have not
10
+ published. Until the first release, install from a clone (README, "Install").
11
+ - New `SECURITY.md` (private vulnerability reporting), `names.json` (the only
12
+ official package names) and a CI check that fails when a document names any
13
+ other package.
14
+ - Releases are built and published only by `.github/workflows/release.yml`
15
+ through PyPI trusted publishing, with provenance attestations.
16
+
17
+ ### Changed
18
+ - **Renamed (breaking), `sf-` = Smart Family:** repository `SmartTasksOrg/sf-smartpangolin`, PyPI package `sf-smartpangolin`, command `sf-smartpangolin`, import package `sf_smartpangolin`, MCP server `io.github.smarttasksorg/sf-smartpangolin`. The unprefixed names are not used any more, so nobody can be sent to a look-alike.
19
+ - README: "Install" and "Status" sections (Status: experimental, no "production" claim); MCP marker is the bare server name.
20
+ - `pyproject.toml`: "3 - Alpha" classifier (was "5 - Production/Stable"), licence files incl. NOTICE, URLs point at `master`.
21
+ - Token uploads removed: `make publish`, `make publish-test` and `scripts/publish.sh` no longer upload; `PUBLISHING.md` rewritten.
22
+ - Docs refer to tag `v3.0.0` (the first release) instead of `v1.0.0`/`v1`, which do not exist.
23
+ - Node port package `sf-smartpangolin-check` (unpublished); Go module path `github.com/SmartTasksOrg/sf-smartpangolin/ports/go`.
24
+ - `MARKETING.md` moved out of the public repository.
25
+
26
+ ## [3.0.0] — 2026-08-04
27
+
28
+ Aligned to the **Smart\* family v3.0.0** release. The full packager (`pango`
29
+ `pack`/`verify`/`triage`, engine, PII, ports, kits, adapters, docs) is unchanged
30
+ and intact. Additions for family integration:
31
+
32
+ - Family quick-scan API — `smartpangolin.core.scan()` and `smartpangolin.models`
33
+ (`ScanResult`, `Finding`) — with **base64/hex-decode-aware** secret detection and
34
+ a **deterministic, real SHA-256** `policy_hash`.
35
+ - Bundled `demo/repo`, IAIso mapping (`spec/iaiso-map.json`), `.smart.json` family
36
+ metadata, and a `smartpangolin` console alias (the `pango` command is unchanged).
37
+ - `pango`/`smartpangolin` (no args) and `--demo` now run a safe demo instead of
38
+ packing the current directory.
39
+
40
+ ## [1.0.0] — 2026-08-02
41
+
42
+ First public release. Extracted and hardened from the SmartTasks internal
43
+ `get_folder_structure.py -> get_source.py -> get_share_zip.py` pipeline.
44
+
45
+ ### Added
46
+ - `pango` CLI (`pack`, `verify`, `triage`, `tree`, `purge`, `policy`, `init`) and
47
+ a Python API `smartpangolin.pack()` returning a structured `PackResult`.
48
+ - Rule families with stable, greppable IDs recorded in `EXCLUSIONS.json`:
49
+ `SEC-PATH-*` (dangerous filenames), `SEC-CONT-*` (~20 in-content secret
50
+ patterns), `LOC-*` (local-infrastructure leaks), `OPS-*` (operational).
51
+ - `.gitignore` honouring (`OPS-GITIGNORE`) — nested files, negation, anchored and
52
+ directory patterns, `**`; on by default, overridable and auditable.
53
+ - `public` / `private` share modes (local-infrastructure disclosure toggle).
54
+ - The `.secret/` folder standard (`SEC-DIR-SECRET`) and per-repo `.pangolin.json`
55
+ overrides that fold into an auditable `policy_sha256`; deterministic
56
+ `content_sha256` and byte-reproducible archives.
57
+ - Native, dependency-free ports for **Node, Go, Java, and PHP**, each conformance-
58
+ tested to produce the same rule IDs as the Python reference on every rule and
59
+ both share modes (`ports/conformance/run.sh`).
60
+ - Integration kits: a zero-dependency **MCP server** (`smartpangolin-mcp`) for AI
61
+ coding tools, plus LangChain / LlamaIndex / function-calling adapters and
62
+ CI / pre-commit templates.
63
+ - Editor secret-search patterns for VS Code and ripgrep, and a one-command
64
+ bootstrap for the standardized secret locations.
65
+ - Hardening: secrets embedded in binary-safe assets (images, fonts) and in
66
+ oversize files are now scanned and withheld, and zero-width / invisible
67
+ characters are stripped before matching (so a key split by a hidden character
68
+ is still caught) — across Python and all four ports.
69
+
@@ -0,0 +1,200 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but not
32
+ limited to compiled object code, generated documentation, and
33
+ conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work.
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the
48
+ original version of the Work and any modifications or additions
49
+ to that Work or Derivative Works thereof, that is intentionally
50
+ submitted to Licensor for inclusion in the Work by the copyright owner
51
+ or by an individual or Legal Entity authorized to submit on behalf of
52
+ the copyright owner. For the purposes of this definition, "submitted"
53
+ means any form of electronic, verbal, or written communication sent
54
+ to the Licensor or its representatives, including but not limited to
55
+ communication on electronic mailing lists, source code control systems,
56
+ and issue tracking systems that are managed by, or on behalf of, the
57
+ Licensor for the purpose of discussing and improving the Work, but
58
+ excluding communication that is conspicuously marked or otherwise
59
+ designated in writing by the copyright owner as "Not a Contribution."
60
+
61
+ "Contributor" shall mean Licensor and any individual or Legal Entity
62
+ on behalf of whom a Contribution has been received by Licensor and
63
+ subsequently incorporated within the Work.
64
+
65
+ 2. Grant of Copyright License. Subject to the terms and conditions of
66
+ this License, each Contributor hereby grants to You a perpetual,
67
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
68
+ copyright license to reproduce, prepare Derivative Works of,
69
+ publicly display, publicly perform, sublicense, and distribute the
70
+ Work and such Derivative Works in Source or Object form.
71
+
72
+ 3. Grant of Patent License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ (except as stated in this section) patent license to make, have made,
76
+ use, offer to sell, sell, import, and otherwise transfer the Work,
77
+ where such license applies only to those patent claims licensable
78
+ by such Contributor that are necessarily infringed by their
79
+ Contribution(s) alone or by combination of their Contribution(s)
80
+ with the Work to which such Contribution(s) was submitted. If You
81
+ institute patent litigation against any entity (including a
82
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
83
+ or a Contribution incorporated within the Work constitutes direct
84
+ or contributory patent infringement, then any patent licenses
85
+ granted to You under this License for that Work shall terminate
86
+ as of the date such litigation is filed.
87
+
88
+ 4. Redistribution. You may reproduce and distribute copies of the
89
+ Work or Derivative Works thereof in any medium, with or without
90
+ modifications, and in Source or Object form, provided that You
91
+ meet the following conditions:
92
+
93
+ (a) You must give any other recipients of the Work or Derivative
94
+ Works a copy of this License; and
95
+
96
+ (b) You must cause any modified files to carry prominent notices
97
+ stating that You changed the files; and
98
+
99
+ (c) You must retain, in the Source form of any Derivative Works
100
+ that You distribute, all copyright, patent, trademark, and
101
+ attribution notices from the Source form of the Work,
102
+ excluding those notices that do not pertain to any part of
103
+ the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its
106
+ distribution, then any Derivative Works that You distribute must
107
+ include a readable copy of the attribution notices contained
108
+ within such NOTICE file, excluding those notices that do not
109
+ pertain to any part of the Derivative Works, in at least one
110
+ of the following places: within a NOTICE text file distributed
111
+ as part of the Derivative Works; within the Source form or
112
+ documentation, if provided along with the Derivative Works; or,
113
+ within a display generated by the Derivative Works, if and
114
+ wherever such third-party notices normally appear. The contents
115
+ of the NOTICE file are for informational purposes only and do
116
+ not modify the License. You may add Your own attribution notices
117
+ within Derivative Works that You distribute, alongside or as an
118
+ addendum to the NOTICE text from the Work, provided that such
119
+ additional attribution notices cannot be construed as modifying
120
+ the License.
121
+
122
+ You may add Your own copyright statement to Your modifications and
123
+ may provide additional or different license terms and conditions
124
+ for use, reproduction, or distribution of Your modifications, or
125
+ for any such Derivative Works as a whole, provided Your use,
126
+ reproduction, and distribution of the Work otherwise complies with
127
+ the conditions stated in this License.
128
+
129
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
130
+ any Contribution intentionally submitted for inclusion in the Work
131
+ by You to the Licensor shall be under the terms and conditions of
132
+ this License, without any additional terms or conditions.
133
+ Notwithstanding the above, nothing herein shall supersede or modify
134
+ the terms of any separate license agreement you may have executed
135
+ with Licensor regarding such Contributions.
136
+
137
+ 6. Trademarks. This License does not grant permission to use the trade
138
+ names, trademarks, service marks, or product names of the Licensor,
139
+ except as required for reasonable and customary use in describing the
140
+ origin of the Work and reproducing the content of the NOTICE file.
141
+
142
+ 7. Disclaimer of Warranty. Unless required by applicable law or
143
+ agreed to in writing, Licensor provides the Work (and each
144
+ Contributor provides its Contributions) on an "AS IS" BASIS,
145
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
146
+ implied, including, without limitation, any warranties or conditions
147
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
148
+ PARTICULAR PURPOSE. You are solely responsible for determining the
149
+ appropriateness of using or redistributing the Work and assume any
150
+ risks associated with Your exercise of permissions under this License.
151
+
152
+ 8. Limitation of Liability. In no event and under no legal theory,
153
+ whether in tort (including negligence), contract, or otherwise,
154
+ unless required by applicable law (such as deliberate and grossly
155
+ negligent acts) or agreed to in writing, shall any Contributor be
156
+ liable to You for damages, including any direct, indirect, special,
157
+ incidental, or consequential damages of any character arising as a
158
+ result of this License or out of the use or inability to use the
159
+ Work (including but not limited to damages for loss of goodwill,
160
+ work stoppage, computer failure or malfunction, or any and all
161
+ other commercial damages or losses), even if such Contributor
162
+ has been advised of the possibility of such damages.
163
+
164
+ 9. Accepting Warranty or Additional Liability. While redistributing
165
+ the Work or Derivative Works thereof, You may choose to offer,
166
+ and charge a fee for, acceptance of support, warranty, indemnity,
167
+ or other liability obligations and/or rights consistent with this
168
+ License. However, in accepting such obligations, You may act only
169
+ on Your own behalf and on Your sole responsibility, not on behalf
170
+ of any other Contributor, and only if You agree to indemnify,
171
+ defend, and hold each Contributor harmless for any liability
172
+ incurred by, or claims asserted against, such Contributor by reason
173
+ of your accepting any such warranty or additional liability.
174
+
175
+ END OF TERMS AND CONDITIONS
176
+
177
+ APPENDIX: How to apply the Apache License to your work.
178
+
179
+ To apply the Apache License to your work, attach the following
180
+ boilerplate notice, with the fields enclosed by brackets "[]"
181
+ replaced with your own identifying information. (Don't include
182
+ the brackets!) The text should be enclosed in the appropriate
183
+ comment syntax for the file format. We also recommend that a
184
+ file or class name and description of purpose be included on the
185
+ same "printed page" as the copyright notice for easier
186
+ identification within third-party archives.
187
+
188
+ Copyright [yyyy] [name of copyright owner]
189
+
190
+ Licensed under the Apache License, Version 2.0 (the "License");
191
+ you may not use this file except in compliance with the License.
192
+ You may obtain a copy of the License at
193
+
194
+ http://www.apache.org/licenses/LICENSE-2.0
195
+
196
+ Unless required by applicable law or agreed to in writing, software
197
+ distributed under the License is distributed on an "AS IS" BASIS,
198
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199
+ See the License for the specific language governing permissions and
200
+ limitations under the License.
@@ -0,0 +1,16 @@
1
+ SmartPangolin
2
+ Copyright 2026 Roen Branham, Le Thanh
3
+
4
+ Licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ Names and affiliation
7
+ ---------------------
8
+
9
+ SmartPangolin is published by SmartTasksOrg. The only package names it is
10
+ published under are those marked "registered": true in names.json.
11
+
12
+ LangChain is a trademark of its owner.
13
+ LlamaIndex is a trademark of its owner.
14
+ All other names are the property of their respective owners. Their use here
15
+ only says what the software reads, evaluates or connects to; it does not
16
+ imply affiliation, sponsorship or endorsement.
@@ -0,0 +1,279 @@
1
+ Metadata-Version: 2.5
2
+ Name: sf-smartpangolin
3
+ Version: 3.0.0
4
+ Summary: Deterministic, fail-closed, auditable secret-scrubbing packager for sharing code and data with LLMs and third parties.
5
+ Project-URL: Homepage, https://github.com/SmartTasksOrg/sf-smartpangolin
6
+ Project-URL: Source, https://github.com/SmartTasksOrg/sf-smartpangolin
7
+ Project-URL: Issues, https://github.com/SmartTasksOrg/sf-smartpangolin/issues
8
+ Project-URL: Security, https://github.com/SmartTasksOrg/sf-smartpangolin/security/policy
9
+ Project-URL: Changelog, https://github.com/SmartTasksOrg/sf-smartpangolin/blob/master/CHANGELOG.md
10
+ Project-URL: Documentation, https://github.com/SmartTasksOrg/sf-smartpangolin/tree/master/docs
11
+ Project-URL: SmartTasks (data fabric), https://smarttasks.cloud
12
+ Project-URL: IAIso (control framework), https://iaiso.org
13
+ Project-URL: Model repacks (Hugging Face), https://huggingface.co/smarttasks
14
+ Author: Roen Branham, Le Thanh
15
+ License-Expression: Apache-2.0
16
+ License-File: LICENSE
17
+ License-File: NOTICE
18
+ Keywords: context,deterministic,iaiso,llm,pre-commit,provenance,redaction,sbom,secrets,security,share,smarttasks,supply-chain
19
+ Classifier: Development Status :: 3 - Alpha
20
+ Classifier: Environment :: Console
21
+ Classifier: Intended Audience :: Developers
22
+ Classifier: Intended Audience :: Information Technology
23
+ Classifier: Operating System :: OS Independent
24
+ Classifier: Programming Language :: Python :: 3
25
+ Classifier: Programming Language :: Python :: 3 :: Only
26
+ Classifier: Programming Language :: Python :: 3.8
27
+ Classifier: Programming Language :: Python :: 3.9
28
+ Classifier: Programming Language :: Python :: 3.10
29
+ Classifier: Programming Language :: Python :: 3.11
30
+ Classifier: Programming Language :: Python :: 3.12
31
+ Classifier: Topic :: Security
32
+ Classifier: Topic :: Software Development :: Build Tools
33
+ Classifier: Topic :: Utilities
34
+ Requires-Python: >=3.8
35
+ Provides-Extra: dev
36
+ Requires-Dist: build>=1.0; extra == 'dev'
37
+ Requires-Dist: pytest>=7; extra == 'dev'
38
+ Requires-Dist: ruff>=0.4; extra == 'dev'
39
+ Requires-Dist: twine>=5.0; extra == 'dev'
40
+ Description-Content-Type: text/markdown
41
+
42
+ <!-- mcp-name: io.github.smarttasksorg/sf-smartpangolin -->
43
+ <h1 align="center">🦔 SmartPangolin</h1>
44
+ <p align="center"><b>Scan before you share. Stop leaking secrets into AI models, agents, and tools.</b></p>
45
+ <p align="center">
46
+ <a href="https://iaiso.org">IAIso §1 · Secure Sharing</a> ·
47
+ <a href="https://smarttasks.cloud">SmartTasks.cloud</a> ·
48
+ <a href="#part-of-the-smart-family">the Smart* family</a>
49
+ </p>
50
+
51
+ ---
52
+
53
+ ## You paste your repo into an AI. What did you just leak?
54
+
55
+ As AI reshapes how we work, a new gap opens: feeding code/docs to ai leaks secrets, keys, and internal detail. **SmartPangolin** closes it —
56
+ `scan` at the exact moment the gap bites, and it works the second you clone it
57
+ (a synthetic demo ships in `demo/`).
58
+
59
+ ## Install
60
+
61
+ SmartPangolin is not published on PyPI or any other package registry yet. Until
62
+ this section says otherwise, a package called `sf-smartpangolin` on any registry
63
+ is not ours, and neither is `smartpangolin`. The PyPI package `pango` is a placeholder published by someone else; it is not this tool.
64
+
65
+ Install from a clone (Python 3.8 or later):
66
+
67
+ ```bash
68
+ git clone https://github.com/SmartTasksOrg/sf-smartpangolin
69
+ cd sf-smartpangolin
70
+ python -m venv .venv
71
+ . .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1
72
+ python -m pip install .
73
+ sf-smartpangolin --demo
74
+ ```
75
+
76
+ ## Status
77
+
78
+ - **Version 3.0.0, experimental.** A deterministic secret-scanning packager with 31 tests, including red-team regression cases; [SECURITY.md](SECURITY.md#detection-scope--limitations-be-honest-with-yourself) lists what it does not detect.
79
+ - **Published:** nowhere yet; install from a clone (above).
80
+ - **Tested:** lint, the 31 tests and a `sf-smartpangolin pack` dry run on Linux, Windows and macOS with Python 3.8, 3.10 and 3.12, on every push to master and every pull request (`.github/workflows/ci.yml`).
81
+ - **Not tested:** Python 3.9, 3.11 and 3.13.
82
+ - **Ports:** Go, Java, Node and PHP ports in `ports/` are checked against the Python reference by `ports/conformance/run.sh` (run by hand, not in CI); they are not published on any registry.
83
+ - **Security review:** none independent. Report vulnerabilities as described in [SECURITY.md](SECURITY.md).
84
+
85
+ ## Run it in your stack
86
+
87
+ | Where you work | How you run it |
88
+ |---|---|
89
+ | **Python** | from a clone: `python -m pip install .` (not on PyPI yet) |
90
+ | **Go · Java · Node · PHP** | native ports in [`ports/`](ports/), each verified against the Python reference by [`ports/conformance/run.sh`](ports/conformance/run.sh) |
91
+ | **LangChain · LlamaIndex · function-calling · MCP** | drop-in integration kits in [`kits/`](kits/) |
92
+ | **Flowise · VS Code** | ready-made wrappers in [`integrations/`](integrations/), all calling one `adapter.py` |
93
+ | **CI / pre-commit** | add the hook from [`.pre-commit-hooks.yaml`](.pre-commit-hooks.yaml) |
94
+
95
+ ## What's in this repo
96
+
97
+ - **Core engine** — [`src/sf_smartpangolin/`](src/sf_smartpangolin/): scan() -> ScanResult. Deterministic, dependency-free.
98
+ - **CLI** — `sf-smartpangolin pack | verify | triage | tree | purge | policy | init`, the full fail-closed packager. `sf-smartpangolin --demo` runs the quick demo; the family `scan()` API is the lightweight scanner.
99
+ - **Language ports** — [`ports/`](ports/): native Go, Java, Node, PHP implementations that reproduce the Python reference, with a shared conformance harness.
100
+ - **Integration kits** — [`kits/`](kits/): LangChain, LlamaIndex, function-calling, MCP, CI, and pre-commit starters.
101
+ - **Adapters** — [`adapters/`](adapters/): GitHub Action and language adapters.
102
+ - **Framework integrations** — [`integrations/`](integrations/): Flowise, VS Code extension — each a thin wrapper over one `adapter.py` bound to the core.
103
+ - **MCP server** — `sf-smartpangolin-mcp` console script, for agentic/AI-coding clients.
104
+ - **Reference docs** — [`docs/`](docs/): 10 documents (CLI, policy, design, FAQ, porting…).
105
+ - **Also included** — a runnable [`demo/`](demo/), [`examples/`](examples/), the IAIso mapping [`spec/iaiso-map.json`](spec/iaiso-map.json), a browser [`site/playground.html`](site/playground.html), plus public smoke tests in `tests/`.
106
+
107
+ ## How it works
108
+
109
+ Rule IDs are namespaced `SEC-*` so output looks kin to the rest of the family
110
+ (SmartCheck's `CHECK-*`, SmartSeal's `SEAL-*`, etc.). Deterministic, dependency-free, fail-loud.
111
+
112
+ ### The data objects (UML)
113
+
114
+ These are real dataclasses in [`src/sf_smartpangolin/models.py`](src/sf_smartpangolin/models.py) — the
115
+ diagram and the code are the same thing:
116
+
117
+ ```mermaid
118
+ classDiagram
119
+ class Finding {
120
+ +rule: str
121
+ +severity: str
122
+ +path: str
123
+ +detail: str
124
+ }
125
+ class Policy {
126
+ +rules: list[str]
127
+ +hash: str
128
+ }
129
+ class ScanResult {
130
+ +findings: list[Finding]
131
+ +verdict: str
132
+ +policy_hash: str
133
+ }
134
+ class IAIsoControl {
135
+ +section: str
136
+ +name: str
137
+ }
138
+ ScanResult ..> IAIsoControl : conforms to
139
+ ```
140
+
141
+ ## Where it sits in the architecture
142
+
143
+ SmartPangolin doesn't stand alone — it stacks with the family, and everything conforms to
144
+ the IAIso standard — the same standard that governs SmartTasks' own apps, while each tool here stays standalone and drops into your architecture:
145
+
146
+ ```mermaid
147
+ graph LR
148
+ IAIso([IAIso standard]):::std
149
+ Cloud([SmartTasks.cloud]):::cloud
150
+ SmartPangolin[SmartPangolin]:::tool
151
+ SmartPrompt[SmartPrompt]:::tool
152
+ SmartCheck[SmartCheck]:::tool
153
+ SmartSeal[SmartSeal]:::tool
154
+ SmartStandard[SmartStandard]:::tool
155
+ SmartSim[SmartSim]:::tool
156
+ SmartMoat[SmartMoat]:::tool
157
+ SmartRoute[SmartRoute]:::tool
158
+ SmartFeed[SmartFeed]:::tool
159
+ SmartPangolin -->|emits clean artifacts to| SmartSeal
160
+ SmartPrompt -->|hands secret/PII flags to| SmartPangolin
161
+ SmartPrompt -->|enforces prompt rules from| SmartStandard
162
+ SmartCheck -->|stamps verified output with| SmartSeal
163
+ SmartCheck -->|checks against rules from| SmartStandard
164
+ SmartSeal -->|issues receipts consumed by| SmartCheck
165
+ SmartSeal -->|issues receipts consumed by| SmartRoute
166
+ SmartStandard -->|supplies rule sets to| SmartPrompt
167
+ SmartStandard -->|supplies rule sets to| SmartCheck
168
+ SmartSim -->|feeds role forecasts to| SmartMoat
169
+ SmartSim -->|draws signals from| SmartFeed
170
+ SmartMoat -->|consumes forecasts from| SmartSim
171
+ SmartRoute -->|verifies receipts from| SmartSeal
172
+ SmartRoute -->|enforces the standard from| SmartStandard
173
+ SmartFeed -->|feeds signals to| SmartSim
174
+ SmartFeed -->|feeds signals to| SmartMoat
175
+ SmartPangolin -.conforms.-> IAIso
176
+ SmartPangolin -.shares IAIso with.-> Cloud
177
+ SmartPrompt -.conforms.-> IAIso
178
+ SmartPrompt -.shares IAIso with.-> Cloud
179
+ SmartCheck -.conforms.-> IAIso
180
+ SmartCheck -.shares IAIso with.-> Cloud
181
+ SmartSeal -.conforms.-> IAIso
182
+ SmartSeal -.shares IAIso with.-> Cloud
183
+ SmartStandard -.conforms.-> IAIso
184
+ SmartStandard -.shares IAIso with.-> Cloud
185
+ SmartSim -.conforms.-> IAIso
186
+ SmartSim -.shares IAIso with.-> Cloud
187
+ SmartMoat -.conforms.-> IAIso
188
+ SmartMoat -.shares IAIso with.-> Cloud
189
+ SmartRoute -.conforms.-> IAIso
190
+ SmartRoute -.shares IAIso with.-> Cloud
191
+ SmartFeed -.conforms.-> IAIso
192
+ SmartFeed -.shares IAIso with.-> Cloud
193
+ IAIso -.governs.-> Cloud
194
+ classDef tool fill:#1c232d,stroke:#f5b83d,color:#efe9f5;
195
+ classDef std fill:#04121f,stroke:#46d6c8,color:#46d6c8;
196
+ classDef cloud fill:#1a1327,stroke:#a78bfa,color:#a78bfa;
197
+ style SmartPangolin stroke-width:3px,stroke:#ff6b6b;
198
+ ```
199
+
200
+ - **SmartPangolin emits clean artifacts to SmartSeal** →
201
+
202
+ Open [`site/playground.html`](site/playground.html) for the interactive version.
203
+
204
+ ## Part of the Smart* family
205
+
206
+ One system, not nine projects — same mascot, same manifesto voice, same rule-ID style,
207
+ all aligned to the [IAIso standard](https://github.com/SmartTasksOrg/IAIso). Each is an independent, open-source, single-purpose tool you can integrate into your own architecture:
208
+
209
+ | Tool | IAIso | What it does |
210
+ |---|---|---|
211
+ | [SmartPrompt](https://github.com/SmartTasksOrg/sf-smartprompt) | §4 · Context | Lint before you send. Bad prompt in, bad work out — and it's your name on it. |
212
+ | [SmartCheck](https://github.com/SmartTasksOrg/sf-smartcheck) | §2 · Verification | Check before you sign off. Catch the AI when it's confidently wrong. |
213
+ | [SmartSeal](https://github.com/SmartTasksOrg/sf-smartseal) | §3 · Provenance | Seal what you ship. A signed receipt so anyone can verify what they received. |
214
+ | [SmartStandard](https://github.com/SmartTasksOrg/sf-smartstandard) | §7 · Standards | Standardize before you scale. One shared, auditable convention for AI-assisted work. |
215
+ | [SmartSim](https://github.com/SmartTasksOrg/sf-smartsim) | §8 · Foresight | Simulate before it hits you. See your role's task-by-task collapse sequence. |
216
+ | [SmartMoat](https://github.com/SmartTasksOrg/sf-smartmoat) | §6 · Workforce | Know your moat. Score the tasks AI can't easily take — and widen them. |
217
+ | [SmartRoute](https://github.com/SmartTasksOrg/sf-smartroute) | §5 · Orchestration | Route only what you trust. Gate agents and tools with trust scores and guardrails. |
218
+ | [SmartFeed](https://github.com/SmartTasksOrg/sf-smartfeed) | §9 · Awareness | Distill the firehose. A tight brief of only what moves your work. |
219
+
220
+ **Backed by the standard:** SmartPangolin implements **IAIso §1 · Secure Sharing**.
221
+ **Open-source edition:** this repo is the simplified, single-purpose version, built for any org to integrate into its own architecture. SmartTasks' desktop app and [SmartTasks.cloud](https://smarttasks.cloud) run a more advanced, deeply-integrated implementation of the same IAIso governance — a separate product, not this code bundled.
222
+
223
+ ## Who's behind this
224
+
225
+ - **Roen Branham** — CEO & AI Strategy Architect · CISSP-certified AI, security & governance architect; author of IAIso and sole inventor of the Z4 Semantic Fabric patent application. [LinkedIn](https://www.linkedin.com/in/roen-branham-167ab29/)
226
+ - **Le Vu Tanh** — CTO & Core Engineering Lead · Chief architect of the Cortex engine; large-scale system reliability and low-latency infrastructure — the engineer who ships what gets architected. [LinkedIn](https://www.linkedin.com/in/lee-thanh-76aa8ba0/)
227
+
228
+ The team behind IAIso & SmartTasks: a CISSP-certified security & governance architect
229
+ and a large-scale systems engineer — 20+ years shipping secure, AI-driven platforms for
230
+ regulated, blue-chip environments (Allianz, BMW, Rolls-Royce, Heidenhain).
231
+
232
+ <!-- SMARTTASKS-MODELS:START -->
233
+ ## Runs on governed local models
234
+
235
+ Every build ships **SHA256SUMS** and a supply-chain + red-team scan — the same provenance discipline SmartPangolin enforces on your repos.
236
+
237
+ This tool is local-first, so pair it with models you can actually vet. **SmartTasks** publishes 21+ governance-validated GGUF builds on Hugging Face — each with a machine-readable **scorecard** (capability tiers L1 Layman → L5 Agentic, IAIso conformance invariants (pass/warn/fail), OWASP-mapped garak red-team, transparency probes (viewpoint-alignment / over-refusal), and per-file SHA-256). Gate model selection on evidence, not vibes — and every finding, including warnings, is published in full.
238
+
239
+ → **[SmartTasks on Hugging Face](https://huggingface.co/smarttasks)** · [Qwen3.6-27B](https://huggingface.co/smarttasks/Qwen3.6-27B-GGUF) (L5 agentic) · [react-agent-coder-llama-3.1-8b](https://huggingface.co/smarttasks/react-agent-coder-llama-3.1-8b-GGUF) (agentic coder) · [gpt-oss-20b](https://huggingface.co/smarttasks/gpt-oss-20b-GGUF) (open reasoning)
240
+ <!-- SMARTTASKS-MODELS:END -->
241
+
242
+ ## Get in touch
243
+
244
+ - **Companies & enterprises:** [enterprise@smarttasks.cloud](mailto:enterprise@smarttasks.cloud) — we help
245
+ teams integrate SmartPangolin + IAIso into their architecture so governance and
246
+ audit-readiness become a byproduct of how they already work.
247
+ - **The standard:** [IAIso](https://github.com/SmartTasksOrg/IAIso) · [iaiso.org](https://iaiso.org)
248
+ - **The product:** [SmartTasks.cloud](https://smarttasks.cloud)
249
+
250
+ Built by **SmartTasks Lab**. Apache-2.0. Contributions welcome.
251
+
252
+ <!-- SMARTBENCH-METRICS:START -->
253
+ ## Measured effectiveness (benchmarked)
254
+
255
+ SmartTasks tests this tool against live local models, not just unit fixtures. Headline recall across difficulty levels: **100%**.
256
+
257
+ **How to read this.** These come from the Smart\* *effectiveness benchmark*: a local model is driven to produce content of increasing difficulty; the tool (detects secrets (API keys, private keys, dangerous files), including base64/hex-encoded ones) is then run and its verdict scored against an independent oracle (broader than the tool's own rules, so a miss is a real gap).
258
+
259
+ - **Recall** — of cases that genuinely contained the target, the share the tool caught. Low recall = coverage gap.
260
+ - **Precision** — of what the tool flagged, the share that were real problems. Below 100% = false positives.
261
+ - **Levels** — 0 canary · 1 basic · 2 realistic · 3 obfuscated · 4 adversarial (hardest).
262
+ - **Invalid** — the model failed to produce the scenario (e.g. emitted a placeholder, not a real secret); not scored, so the tool is neither credited nor penalized.
263
+ - **Sample size** — model output varies run-to-run; small *n* is noisy. Pooled numbers combine recent runs.
264
+
265
+ | level | n | accuracy | precision | recall |
266
+ |---|---|---|---|---|
267
+ | 0 · canary | 2 | 100% | 100% | 100% |
268
+ | 1 · basic | 8 | 100% | 100% | 100% |
269
+ | 2 · realistic | 8 | 100% | 100% | 100% |
270
+ | 3 · obfuscated | 7 | 100% | 100% | 100% |
271
+ | 4 · adversarial | 8 | 100% | 100% | 100% |
272
+
273
+ **What this run shows:**
274
+ - Instrument check (canary) passes — the fixed sanity cases are all correct, so the higher-level numbers are trustworthy.
275
+ - **Strong** at: basic, realistic, obfuscated, adversarial — near-complete recall.
276
+ - No false positives observed (precision 100%) — the tool does not flag clean input.
277
+
278
+ _Source: run `20260804T134233-fad704` · 2026-08-04T13:45:23 · model(s): llama-3.1-8b-lexi-uncensored-v2 · repeats 8. Numbers reflect these model(s); output varies run-to-run, so re-run and regenerate to refresh._
279
+ <!-- SMARTBENCH-METRICS:END -->