@s-gw/s-gw 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +35 -0
- package/.mcp.json +16 -0
- package/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +197 -0
- package/TRADEMARKS.md +9 -0
- package/assets/icons/aws-ec2.png +0 -0
- package/assets/icons/lucide/bot.svg +8 -0
- package/assets/icons/lucide/monitor.svg +5 -0
- package/assets/icons/lucide/server.svg +6 -0
- package/assets/icons/lucide/terminal.svg +4 -0
- package/assets/icons/s-gw-128.png +0 -0
- package/assets/icons/s-gw-16.png +0 -0
- package/assets/icons/s-gw-180.png +0 -0
- package/assets/icons/s-gw-192.png +0 -0
- package/assets/icons/s-gw-32.png +0 -0
- package/assets/icons/s-gw-64.png +0 -0
- package/assets/icons/s-gw-menu-bar-template.png +0 -0
- package/dist/agent-context.d.ts +17 -0
- package/dist/agent-context.js +207 -0
- package/dist/agents.d.ts +64 -0
- package/dist/agents.js +763 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +1385 -0
- package/dist/command-suggest.d.ts +3 -0
- package/dist/command-suggest.js +131 -0
- package/dist/console-server.d.ts +16 -0
- package/dist/console-server.js +978 -0
- package/dist/console-ui/assets/codex-DYTPdPxi.png +0 -0
- package/dist/console-ui/assets/cursor-CBrUTJD-.png +0 -0
- package/dist/console-ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/console-ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/console-ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/console-ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/console-ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/console-ui/assets/hermes-B8hNbJPm.png +0 -0
- package/dist/console-ui/assets/index-BxUf0Sye.js +96 -0
- package/dist/console-ui/assets/index-CmTiBR_w.css +2 -0
- package/dist/console-ui/assets/omnigent-Cxa4p2Mq.png +0 -0
- package/dist/console-ui/assets/openclaw-C5wL4ZVW.png +0 -0
- package/dist/console-ui/assets/opencode-D_wFATSC.png +0 -0
- package/dist/console-ui/assets/openhands-DnrlGgev.svg +9 -0
- package/dist/console-ui/assets/s-gw-64-ByMUGQ3K.png +0 -0
- package/dist/console-ui/assets/vscode-Bdtr9eyf.png +0 -0
- package/dist/console-ui/assets/zeptoclaw-DztQW8Sw.png +0 -0
- package/dist/console-ui/index.html +13 -0
- package/dist/crypto.d.ts +6 -0
- package/dist/crypto.js +53 -0
- package/dist/executor.d.ts +7 -0
- package/dist/executor.js +297 -0
- package/dist/gateway.d.ts +31 -0
- package/dist/gateway.js +114 -0
- package/dist/guard.d.ts +61 -0
- package/dist/guard.js +247 -0
- package/dist/install.d.ts +146 -0
- package/dist/install.js +629 -0
- package/dist/mcp-server.d.ts +2 -0
- package/dist/mcp-server.js +119 -0
- package/dist/native/s-gw-core +0 -0
- package/dist/native/s-gw-keychain-helper +0 -0
- package/dist/onepassword.d.ts +48 -0
- package/dist/onepassword.js +412 -0
- package/dist/paths.d.ts +4 -0
- package/dist/paths.js +22 -0
- package/dist/s-gw Menu Bar.app/Contents/Info.plist +28 -0
- package/dist/s-gw Menu Bar.app/Contents/MacOS/s-gw-menu-bar-helper +0 -0
- package/dist/s-gw Menu Bar.app/Contents/Resources/AppIcon.icns +0 -0
- package/dist/s-gw Menu Bar.app/Contents/Resources/AwsEc2.png +0 -0
- package/dist/s-gw Menu Bar.app/Contents/Resources/Lucide-bot.svg +8 -0
- package/dist/s-gw Menu Bar.app/Contents/Resources/Lucide-monitor.svg +5 -0
- package/dist/s-gw Menu Bar.app/Contents/Resources/Lucide-server.svg +6 -0
- package/dist/s-gw Menu Bar.app/Contents/Resources/Lucide-terminal.svg +4 -0
- package/dist/s-gw Menu Bar.app/Contents/Resources/MenuBarTemplate.png +0 -0
- package/dist/s-gw Menu Bar.app/Contents/_CodeSignature/CodeResources +194 -0
- package/dist/s-gw.app/Contents/Info.plist +28 -0
- package/dist/s-gw.app/Contents/MacOS/s-gw +0 -0
- package/dist/s-gw.app/Contents/Resources/AppIcon.icns +0 -0
- package/dist/s-gw.app/Contents/Resources/MenuBarTemplate.png +0 -0
- package/dist/s-gw.app/Contents/_CodeSignature/CodeResources +139 -0
- package/dist/scanner.d.ts +9 -0
- package/dist/scanner.js +437 -0
- package/dist/ssh.d.ts +31 -0
- package/dist/ssh.js +286 -0
- package/dist/store.d.ts +131 -0
- package/dist/store.js +1611 -0
- package/dist/types.d.ts +196 -0
- package/dist/types.js +2 -0
- package/dist/unlock.d.ts +29 -0
- package/dist/unlock.js +274 -0
- package/dist/windows/VERSION.txt +1 -0
- package/dist/windows/s-gw-client.cmd +4 -0
- package/dist/windows/s-gw-client.ps1 +106 -0
- package/dist/windows/s-gw-credential.cmd +4 -0
- package/dist/windows/s-gw-credential.ps1 +167 -0
- package/dist/windows/s-gw-helper.cmd +4 -0
- package/dist/windows/s-gw-helper.ps1 +180 -0
- package/docs/README.md +23 -0
- package/docs/agents.md +160 -0
- package/docs/architecture.md +72 -0
- package/docs/deployment.md +447 -0
- package/docs/detection.md +44 -0
- package/docs/images/s-gw-overview.png +0 -0
- package/docs/integrations.md +195 -0
- package/docs/keychain.md +39 -0
- package/docs/onepassword.md +84 -0
- package/docs/quickstart.md +104 -0
- package/docs/threat-model.md +100 -0
- package/docs/ui/THIRD_PARTY_NOTICES.md +111 -0
- package/docs/ui/apple-touch-icon.png +0 -0
- package/docs/ui/favicon-32.png +0 -0
- package/docs/ui/local-console.html +4477 -0
- package/docs/ui/vendor/d3-sankey/d3-array.LICENSE.txt +27 -0
- package/docs/ui/vendor/d3-sankey/d3-array.min.js +2 -0
- package/docs/ui/vendor/d3-sankey/d3-path.LICENSE.txt +27 -0
- package/docs/ui/vendor/d3-sankey/d3-path.min.js +2 -0
- package/docs/ui/vendor/d3-sankey/d3-sankey.LICENSE.txt +27 -0
- package/docs/ui/vendor/d3-sankey/d3-sankey.min.js +2 -0
- package/docs/ui/vendor/d3-sankey/d3-shape.LICENSE.txt +27 -0
- package/docs/ui/vendor/d3-sankey/d3-shape.min.js +2 -0
- package/docs/ui/vendor/sankeymatic/LICENSE.txt +17 -0
- package/docs/ui/vendor/sankeymatic/sankey.js +897 -0
- package/package.json +117 -0
- package/skills/s-gw/SKILL.md +19 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "s-gw",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Local s-gw plugin that lets coding agents use typed secret handles without receiving raw credentials.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Barry Yuan"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"s-gw",
|
|
10
|
+
"secrets",
|
|
11
|
+
"credentials",
|
|
12
|
+
"mcp",
|
|
13
|
+
"codex"
|
|
14
|
+
],
|
|
15
|
+
"skills": "./skills/",
|
|
16
|
+
"mcpServers": "./.mcp.json",
|
|
17
|
+
"interface": {
|
|
18
|
+
"displayName": "s-gw",
|
|
19
|
+
"shortDescription": "Keep secrets local while agents act through handles.",
|
|
20
|
+
"longDescription": "s-gw runs locally on your machine. It detects secrets, creates typed unique handles, requires local approval for secret-backed actions, executes approved operations locally, and returns only sanitized results or completion proofs to coding agents.",
|
|
21
|
+
"developerName": "Barry Yuan",
|
|
22
|
+
"category": "Developer Tools",
|
|
23
|
+
"capabilities": [
|
|
24
|
+
"Interactive",
|
|
25
|
+
"Local Files",
|
|
26
|
+
"Write"
|
|
27
|
+
],
|
|
28
|
+
"defaultPrompt": [
|
|
29
|
+
"Use s-gw to scan this repo for secrets and return handles only.",
|
|
30
|
+
"Use s-gw to list available local secret handles.",
|
|
31
|
+
"Use s-gw to request a secret-backed command without seeing the secret value."
|
|
32
|
+
],
|
|
33
|
+
"brandColor": "#0F766E"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/.mcp.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"s-gw": {
|
|
4
|
+
"command": "node",
|
|
5
|
+
"args": [
|
|
6
|
+
"./dist/mcp-server.js"
|
|
7
|
+
],
|
|
8
|
+
"cwd": ".",
|
|
9
|
+
"env": {
|
|
10
|
+
"SGW_HOME": "~/.s-gw",
|
|
11
|
+
"SGW_AGENT_NAME": "Claude Code"
|
|
12
|
+
},
|
|
13
|
+
"note": "Local-only s-gw MCP server. Raw secrets stay in the local encrypted ledger and are never returned to the agent."
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
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
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and 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
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Barry Yuan
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
s-gw
|
|
2
|
+
Copyright 2026 Barry Yuan
|
|
3
|
+
|
|
4
|
+
This product includes software and artwork developed by third parties. Their
|
|
5
|
+
licenses and attribution notices are listed in docs/ui/THIRD_PARTY_NOTICES.md.
|
|
6
|
+
Third-party product names and marks are used for identification only and are
|
|
7
|
+
not licensed under the Apache License, Version 2.0.
|
package/README.md
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/icons/s-gw-128.png" alt="s-gw" width="96" height="96">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">s-gw</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Local credential control for coding agents.</strong><br>
|
|
9
|
+
Approve bounded actions locally. Keep raw credentials out of model context and tool output.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://github.com/sgateway/s-gw/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/sgateway/s-gw/actions/workflows/ci.yml/badge.svg"></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/@s-gw/s-gw"><img alt="npm" src="https://img.shields.io/npm/v/%40s-gw%2Fs-gw"></a>
|
|
15
|
+
<a href="LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-2ea44f"></a>
|
|
16
|
+
<img alt="Node.js 20+" src="https://img.shields.io/badge/Node.js-20%2B-43853d">
|
|
17
|
+
<a href="https://s-gw.com"><img alt="Website: s-gw.com" src="https://img.shields.io/badge/website-s--gw.com-22c55e"></a>
|
|
18
|
+
<img alt="Project status: preview" src="https://img.shields.io/badge/status-preview-f59e0b">
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<a href="https://s-gw.com">Demo</a> ·
|
|
23
|
+
<a href="#quick-start">Quick start</a> ·
|
|
24
|
+
<a href="docs/README.md">Documentation</a> ·
|
|
25
|
+
<a href="SECURITY.md">Security</a> ·
|
|
26
|
+
<a href="CONTRIBUTING.md">Contributing</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
[](https://s-gw.com)
|
|
30
|
+
|
|
31
|
+
s-gw is a local gateway between coding agents and credentials. Agents work with typed handles and scoped action requests. You approve the request on your machine, s-gw resolves the credential inside a constrained local process, and the agent gets sanitized output instead of the raw value.
|
|
32
|
+
|
|
33
|
+
> [!IMPORTANT]
|
|
34
|
+
> s-gw is an early preview. Storage formats and interfaces may change, Windows support is still experimental, and the project has not completed an independent security audit. Do not treat it as a replacement for endpoint security or a hardened enterprise secrets platform yet.
|
|
35
|
+
|
|
36
|
+
## What It Does
|
|
37
|
+
|
|
38
|
+
| Govern | Approve | Execute | Audit |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| Turn secrets into typed local handles that agents can reference safely. | Review the requesting agent, handle, command, environment binding, working directory, and target before access is granted. | Inject the credential only into the approved child process on the same machine. | Record request, approval, execution, policy, and destination evidence without storing returned raw secrets. |
|
|
41
|
+
|
|
42
|
+
## Why Teams Use It
|
|
43
|
+
|
|
44
|
+
- **Local custody:** raw values stay in macOS Keychain, Windows Credential Manager, 1Password, or the encrypted local ledger.
|
|
45
|
+
- **Action-scoped access:** grants bind to the agent, handle, command, environment variable, working directory, target, approval mode, and optional time window.
|
|
46
|
+
- **Useful handles:** agents can request real work with stable handle names instead of seeing keys, passwords, tokens, or SSH material.
|
|
47
|
+
- **Output sanitization:** command output is scanned before it returns to the agent, replacing detected credential values with handles.
|
|
48
|
+
- **Agent-aware setup:** Codex, Claude Code, Cursor, OpenCode, Gemini CLI, GitHub Copilot, VS Code, and other MCP clients get profile-specific configuration.
|
|
49
|
+
- **Local operator UI:** the macOS app, menu helper, CLI, and web console show approvals, credential inventory, policies, usage flow, activity, and audit history.
|
|
50
|
+
|
|
51
|
+
## Demo
|
|
52
|
+
|
|
53
|
+
Public demo: [s-gw.com](https://s-gw.com). The demo highlights the local console, trust loop, approval flow, supported agent catalog, and usage map.
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
## How It Works
|
|
58
|
+
|
|
59
|
+
```mermaid
|
|
60
|
+
flowchart LR
|
|
61
|
+
A["Coding agent"] -->|"Handle + action request"| G["s-gw local gateway"]
|
|
62
|
+
G --> U["Local approval"]
|
|
63
|
+
U --> R["Constrained runner"]
|
|
64
|
+
K[("Keychain / Credential Manager / encrypted store")] --> R
|
|
65
|
+
R -->|"Sanitized output"| G
|
|
66
|
+
G --> A
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The agent never needs the unlock passphrase or raw credential. Approval is scoped to the requested operation rather than granting general access to the store.
|
|
70
|
+
|
|
71
|
+
## Core Surfaces
|
|
72
|
+
|
|
73
|
+
| Surface | Purpose |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| `s-gw` CLI | Setup, credential enrollment, approvals, policies, agent snippets, guard mode, and diagnostics. |
|
|
76
|
+
| `s-gw-mcp` | Stdio MCP server for agent-facing handle discovery and request creation. |
|
|
77
|
+
| Native macOS app | Approval queue, credential inventory, policy rules, usage flow, activity, and audit review. |
|
|
78
|
+
| Menu-bar helper | Fast visibility into pending approvals and local daemon status. |
|
|
79
|
+
| Local web console | Browser-accessible fallback UI bound to `127.0.0.1`. |
|
|
80
|
+
| Guard mode | Launch agents with credential-looking environment values replaced by s-gw handles. |
|
|
81
|
+
|
|
82
|
+
## Quick Start
|
|
83
|
+
|
|
84
|
+
Requirements: Node.js 20 or newer.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm install -g @s-gw/s-gw
|
|
88
|
+
s-gw setup
|
|
89
|
+
s-gw status
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
To build from source, use a stable Rust toolchain. Building the native macOS surfaces also requires a Swift toolchain.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
git clone https://github.com/sgateway/s-gw.git
|
|
96
|
+
cd s-gw
|
|
97
|
+
npm ci
|
|
98
|
+
npm run build
|
|
99
|
+
npm link
|
|
100
|
+
s-gw setup
|
|
101
|
+
s-gw status
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`s-gw setup` generates local unlock material, stores it in the operating system credential store, initializes the encrypted ledger, and starts the local UI surfaces available on the current platform.
|
|
105
|
+
|
|
106
|
+
Add a credential from your terminal without placing the value in chat or a process argument:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
printf '%s' "$MY_API_TOKEN" | s-gw secret add-keychain \
|
|
110
|
+
--name demo-token \
|
|
111
|
+
--type api-token \
|
|
112
|
+
--value-stdin \
|
|
113
|
+
--inject-env API_TOKEN \
|
|
114
|
+
--allow-command "$(command -v printenv)"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Then inspect the non-secret handle metadata:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
s-gw secret list
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The [end-to-end trust loop](docs/quickstart.md) walks through a disposable request, local approval, execution, and output sanitization without touching a real credential.
|
|
124
|
+
|
|
125
|
+
## Agent Integration
|
|
126
|
+
|
|
127
|
+
List the known agent profiles and render the configuration for one client:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
s-gw agent list
|
|
131
|
+
s-gw agent mcp-snippet codex
|
|
132
|
+
s-gw agent mcp-snippet claude-code
|
|
133
|
+
s-gw agent mcp-snippet opencode
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
For CLI agents, guard mode can replace credential-looking launch environment values with s-gw handles before the agent starts:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
s-gw run codex --dry-run -- -v
|
|
140
|
+
s-gw run codex -- --ask-for-approval never
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
MCP registration does not intercept every prompt, file read, shell, or environment variable. See [agent integration](docs/integrations.md) and the [agent profile matrix](docs/agents.md) for the supported paths and current limitations.
|
|
144
|
+
|
|
145
|
+
## Example Request Flow
|
|
146
|
+
|
|
147
|
+
1. An agent sees `s-gw:credential:prod-readonly` and asks to run `aws sts get-caller-identity`.
|
|
148
|
+
2. s-gw creates a pending request with the agent name, command, handle, environment binding, working directory, target, and policy result.
|
|
149
|
+
3. You approve once, for a time window, for the login session, or deny it.
|
|
150
|
+
4. s-gw starts the approved local process with the credential injected into the requested environment variable.
|
|
151
|
+
5. s-gw scans the process output before it returns to the agent.
|
|
152
|
+
|
|
153
|
+
The model can complete the task without receiving the raw access key.
|
|
154
|
+
|
|
155
|
+
## Platform Status
|
|
156
|
+
|
|
157
|
+
| Platform | Status | Credential store | User interface |
|
|
158
|
+
| --- | --- | --- | --- |
|
|
159
|
+
| macOS 14+ | Primary development platform | Keychain | Native app, menu helper, local web console |
|
|
160
|
+
| Windows 10/11 | Preview | Credential Manager | PowerShell client, tray helper, local web console |
|
|
161
|
+
| Linux | Experimental CLI | Environment-provided unlock material | Local web console |
|
|
162
|
+
|
|
163
|
+
Preview installers are available from [GitHub Releases](https://github.com/sgateway/s-gw/releases). The macOS DMG is ad-hoc signed and unnotarized, and the Windows package is unsigned preview software. Build the same artifacts locally with `npm run build:installers`.
|
|
164
|
+
|
|
165
|
+
## Security Model
|
|
166
|
+
|
|
167
|
+
s-gw is designed to reduce accidental credential exposure to coding agents. It does not protect against a compromised operating system account, a malicious approved executable, screen capture, kernel-level access, or every transformed derivative of a secret.
|
|
168
|
+
|
|
169
|
+
Read the [threat model](docs/threat-model.md) before relying on s-gw for sensitive workflows. Report suspected vulnerabilities through [GitHub private vulnerability reporting](SECURITY.md), not a public issue.
|
|
170
|
+
|
|
171
|
+
## Project Status
|
|
172
|
+
|
|
173
|
+
- Public source distribution is preview quality.
|
|
174
|
+
- macOS is the primary development and test platform.
|
|
175
|
+
- Windows Credential Manager support is present but still needs broader native QA.
|
|
176
|
+
- Linux currently depends on environment-provided unlock material.
|
|
177
|
+
- Desktop preview downloads are unsigned and intended for evaluation.
|
|
178
|
+
- The repository is prepared for open-source collaboration, but security-sensitive changes should come with focused tests and threat-model updates when behavior changes.
|
|
179
|
+
|
|
180
|
+
## Documentation
|
|
181
|
+
|
|
182
|
+
- [Documentation index](docs/README.md)
|
|
183
|
+
- [Quick start and trust-loop demo](docs/quickstart.md)
|
|
184
|
+
- [Architecture](docs/architecture.md)
|
|
185
|
+
- [Threat model](docs/threat-model.md)
|
|
186
|
+
- [Agent integrations](docs/integrations.md)
|
|
187
|
+
- [Credential stores and 1Password](docs/keychain.md)
|
|
188
|
+
- [Deployment and packaging](docs/deployment.md)
|
|
189
|
+
- [Third-party assets and licenses](docs/ui/THIRD_PARTY_NOTICES.md)
|
|
190
|
+
|
|
191
|
+
## Contributing
|
|
192
|
+
|
|
193
|
+
Issues and focused pull requests are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md), and use [SECURITY.md](SECURITY.md) for anything that may expose credentials or bypass approval.
|
|
194
|
+
|
|
195
|
+
## License
|
|
196
|
+
|
|
197
|
+
Apache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE). Third-party names and artwork remain the property of their respective owners and are documented in [TRADEMARKS.md](TRADEMARKS.md) and the [third-party notices](docs/ui/THIRD_PARTY_NOTICES.md).
|
package/TRADEMARKS.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Trademarks And Brand Assets
|
|
2
|
+
|
|
3
|
+
The Apache License, Version 2.0 covers s-gw source code and original project materials. It does not grant rights to third-party names, logos, icons, or other brand assets included for product identification and interoperability.
|
|
4
|
+
|
|
5
|
+
Codex, OpenAI, Claude, Anthropic, Cursor, OpenCode, Visual Studio Code, GitHub, GitHub Copilot, 1Password, AWS, Amazon EC2, Gemini, Google, Windsurf, and other product names or marks are the property of their respective owners. Their appearance in s-gw does not imply sponsorship, endorsement, or affiliation.
|
|
6
|
+
|
|
7
|
+
Third-party asset sources and available licenses are listed in [docs/ui/THIRD_PARTY_NOTICES.md](docs/ui/THIRD_PARTY_NOTICES.md). Where no reusable asset license is listed, the asset is excluded from the Apache-2.0 license and is used only to identify the compatible product. Redistributors are responsible for reviewing applicable trademark and brand guidelines.
|
|
8
|
+
|
|
9
|
+
The s-gw name and original s-gw artwork identify this project. The Apache-2.0 license permits use of the code but does not grant permission to imply that a modified distribution is an official s-gw release.
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<path d="M12 8V4H8"/>
|
|
3
|
+
<rect width="16" height="12" x="4" y="8" rx="2"/>
|
|
4
|
+
<path d="M2 14h2"/>
|
|
5
|
+
<path d="M20 14h2"/>
|
|
6
|
+
<path d="M15 13v2"/>
|
|
7
|
+
<path d="M9 13v2"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<rect width="20" height="14" x="2" y="3" rx="2"/>
|
|
3
|
+
<line x1="8" x2="16" y1="21" y2="21"/>
|
|
4
|
+
<line x1="12" x2="12" y1="17" y2="21"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<rect width="20" height="8" x="2" y="2" rx="2"/>
|
|
3
|
+
<rect width="20" height="8" x="2" y="14" rx="2"/>
|
|
4
|
+
<line x1="6" x2="6.01" y1="6" y2="6"/>
|
|
5
|
+
<line x1="6" x2="6.01" y1="18" y2="18"/>
|
|
6
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AgentIdentitySource } from "./types.js";
|
|
2
|
+
export type { AgentIdentitySource } from "./types.js";
|
|
3
|
+
export interface AgentIdentity {
|
|
4
|
+
name: string;
|
|
5
|
+
source: AgentIdentitySource;
|
|
6
|
+
}
|
|
7
|
+
export interface AgentIdentityContext {
|
|
8
|
+
agentName?: string;
|
|
9
|
+
mcpClientName?: string;
|
|
10
|
+
env?: NodeJS.ProcessEnv;
|
|
11
|
+
}
|
|
12
|
+
export declare function agentNameFromReason(reason: string): string;
|
|
13
|
+
export declare function requestAgentName(reason: string, env?: NodeJS.ProcessEnv): string;
|
|
14
|
+
export declare function requestAgentIdentity(reason: string, context?: AgentIdentityContext): AgentIdentity;
|
|
15
|
+
export declare function agentNameFromMcpClient(value?: string): string | undefined;
|
|
16
|
+
export declare function detectRuntimeAgentName(env?: NodeJS.ProcessEnv): string | undefined;
|
|
17
|
+
export declare function detectProcessTreeAgentName(env?: NodeJS.ProcessEnv): string | undefined;
|