@mirastacklabs/mirasec-windows-amd64 0.0.0-stage → 0.1.1
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/LICENSE +201 -0
- package/README.md +366 -2
- package/bin/mirasec.exe +4 -0
- package/package.json +19 -4
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 Mirastack Labs
|
|
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/README.md
CHANGED
|
@@ -1,3 +1,367 @@
|
|
|
1
|
-
#
|
|
1
|
+
# mirasec
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Find the quantum-vulnerable cryptography in your code and TLS endpoints, and get a CycloneDX 1.6 CBOM, from inside any MCP-capable AI tool or your CI.
|
|
4
|
+
|
|
5
|
+
## Why mirasec
|
|
6
|
+
|
|
7
|
+
Governments now set dates for moving off quantum-vulnerable public-key cryptography. You can't plan that move without an inventory of what you use.
|
|
8
|
+
|
|
9
|
+
- **US Executive Order 14412** (signed 2026-06-22) requires federal high value assets and high impact systems to use post-quantum cryptography (PQC) for key establishment by 2030-12-31 and for digital signatures by 2031-12-31. It also tells CISA to publish minimum elements for a cryptographic bill of materials (CBOM) within 270 days. mirasec's output is a CBOM. That guidance isn't published yet, and mirasec makes no claim to meet it.
|
|
10
|
+
- **NIST IR 8547**: NIST will deprecate quantum-vulnerable public-key cryptography after 2030 and disallow its use under NIST standards after 2035.
|
|
11
|
+
- Other governments, including the UK NCSC, the EU and Canada, set similar timelines. See [docs/deadlines.md](docs/deadlines.md).
|
|
12
|
+
- See also the [NSA's December 2026 advisory](https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/4662430/nsa-advises-immediate-transition-to-post-quantum-cryptography-to-protect-nation/).
|
|
13
|
+
|
|
14
|
+
Industry says the same. In its [joint statement on transition to post-quantum cryptography](https://www.anthropic.com/news/joint-statement-post-quantum-cryptography) (December 2, 2026), Amazon, Anthropic, Apple, Cloudflare, Google, Meta, Microsoft, OpenAI, and Oracle wrote: "We strongly support the guidance issued by the U.S. government urging organizations to move to the algorithms in the National Institute of Standards and Technology (NIST) Post-Quantum Cryptography (PQC) standards and to accelerate the migration as soon as possible." No endorsement or affiliation implied.
|
|
15
|
+
|
|
16
|
+
mirasec is an open-source scanner for that first step. It inventories cryptography and reports which parts are at risk from a future cryptographically relevant quantum computer.
|
|
17
|
+
|
|
18
|
+
- Works with any MCP client and any model.
|
|
19
|
+
- One binary, local SQLite. Nothing leaves your machine.
|
|
20
|
+
- Output is a CycloneDX 1.6 CBOM, schema-validated. SARIF and a GitHub Action are for CI. Deadline profiles are selected with `--profile`.
|
|
21
|
+
- Signed releases.
|
|
22
|
+
|
|
23
|
+
## What it finds
|
|
24
|
+
|
|
25
|
+
- **Source code.** Crypto use in a local folder or a git URL (RSA, ECDSA, ECDH, AES, SHA-1 and similar), found with regex and manifest rules for C, C++, Go, Java, Python and Rust.
|
|
26
|
+
- **TLS endpoints.** Protocol version, cipher suites, certificate summary and CVE checks for a `host:port`.
|
|
27
|
+
- **CBOM.** Every scan produces a CycloneDX 1.6 Cryptographic Bill of Materials (CBOM).
|
|
28
|
+
- **Quantum priorities.** Each finding is classified against a quantum policy (NIST FIPS 203, 204 and 205), with a priority (P0 to P3), a reason, a recommended target algorithm (for example ML-KEM-768 or ML-DSA-65) and a transition mode (hybrid by default).
|
|
29
|
+
|
|
30
|
+
Network scanning (CIDR ranges, port discovery) is coming in v0.2. It is not part of v0.1.0.
|
|
31
|
+
|
|
32
|
+
mirasec v0.1.0 runs on Linux, macOS and Windows (amd64 and arm64). It needs no config file, database or server.
|
|
33
|
+
|
|
34
|
+
## Quick start
|
|
35
|
+
|
|
36
|
+
mirasec is a stdio MCP server, so it works with any MCP client. `mirasec setup` registers it in your harness and installs the Agent Skills (needs Node.js for `npx`):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx -y mirasec setup <harness> # one harness, for example: cursor, codex, gemini, vscode
|
|
40
|
+
npx -y mirasec setup all # every supported harness whose config directory already exists
|
|
41
|
+
npx -y mirasec setup list # supported harnesses and what is configured
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Add `--dry-run` to see a diff first. It backs up each file it edits and touches only the `mirasec` entry. For the full behaviour and the flags (`--scope`, `--force`, `--no-skills`, `--launcher`), see [docs/setup.md](docs/setup.md). Then ask your agent "is this repo quantum-safe?".
|
|
45
|
+
|
|
46
|
+
For harnesses that setup configures manually (its config is JSONC or YAML, or its path is not confirmed), it prints the snippet and path instead of writing. Every harness below runs the same server command: `npx -y mirasec mcp`.
|
|
47
|
+
|
|
48
|
+
**Windows.** `npx` is a `.cmd` shim that many harnesses cannot spawn directly. Use `cmd` as the command and `["/c", "npx", "-y", "mirasec", "mcp"]` as the arguments (`mirasec setup` does this for you).
|
|
49
|
+
|
|
50
|
+
### Claude Code
|
|
51
|
+
|
|
52
|
+
Plugin (MCP server plus the `quantum-scan` and `quantum-remediate` skills):
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
/plugin marketplace add mirastacklabs-ai/mirasec
|
|
56
|
+
/plugin install mirasec@mirasec
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Or only the MCP server:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
claude mcp add --transport stdio --scope user mirasec -- npx -y mirasec mcp
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Project scope: put this in `.mcp.json` (`mirasec setup claude-code --scope project` writes it):
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{ "mcpServers": { "mirasec": { "type": "stdio", "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Codex
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
codex mcp add mirasec -- npx -y mirasec mcp
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Or add this to `~/.codex/config.toml` (or `.codex/config.toml` in a trusted project). Raise the timeouts: the defaults (10 s startup, 60 s per tool call) are short for an `npx` cold start.
|
|
78
|
+
|
|
79
|
+
```toml
|
|
80
|
+
[mcp_servers.mirasec]
|
|
81
|
+
command = "npx"
|
|
82
|
+
args = ["-y", "mirasec", "mcp"]
|
|
83
|
+
startup_timeout_sec = 60
|
|
84
|
+
tool_timeout_sec = 120
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### OpenCode
|
|
88
|
+
|
|
89
|
+
`opencode.json` (project) or `~/.config/opencode/opencode.json`. The shape depends on your OpenCode version; this is the newer one (`mcp.servers.<name>`). Older versions put the entry directly under `mcp.<name>`, so check your version's docs.
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{ "mcp": { "servers": { "mirasec": { "type": "local", "command": ["npx", "-y", "mirasec", "mcp"], "protocol": "legacy" } } } }
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### VS Code (GitHub Copilot)
|
|
96
|
+
|
|
97
|
+
[Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22mirasec%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mirasec%22%2C%22mcp%22%5D%7D)
|
|
98
|
+
|
|
99
|
+
Native format: `~/.copilot/mcp-config.json` (or `$COPILOT_HOME`), or `.mcp.json` in the workspace root:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{ "mcpServers": { "mirasec": { "type": "stdio", "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The editor's own `.vscode/mcp.json` uses `servers` as the root key instead:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{ "servers": { "mirasec": { "type": "stdio", "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Cursor
|
|
112
|
+
|
|
113
|
+
[Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=mirasec&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1pcmFzZWMiLCJtY3AiXX0%3D)
|
|
114
|
+
|
|
115
|
+
If the link does nothing in your Cursor version, add this to `~/.cursor/mcp.json` or `.cursor/mcp.json`:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{ "mcpServers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Gemini CLI
|
|
122
|
+
|
|
123
|
+
`~/.gemini/settings.json` or `.gemini/settings.json`. The `timeout` is in milliseconds.
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{ "mcpServers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"], "timeout": 600000 } } }
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Windsurf
|
|
130
|
+
|
|
131
|
+
Windsurf's config location is split. Use `~/.codeium/windsurf/mcp_config.json`, or `~/.config/devin/mcp_config.json` / `.devin/mcp_config.json` if your install is managed by Devin:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{ "mcpServers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Claude Desktop
|
|
138
|
+
|
|
139
|
+
Settings, Developer, Edit Config. On macOS the file is `~/Library/Application Support/Claude/claude_desktop_config.json`; on Windows and Linux use the path that Edit Config opens.
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{ "mcpServers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
A GUI app may not have Node.js on its PATH. If `npx` is not found, install the `mirasec` binary and use `mirasec setup claude-desktop --launcher binary`.
|
|
146
|
+
|
|
147
|
+
### Zed
|
|
148
|
+
|
|
149
|
+
User `settings.json` (`~/.config/zed/settings.json`). Zed uses `context_servers`, not `mcpServers`:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{ "context_servers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"], "env": {} } } }
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Cline
|
|
156
|
+
|
|
157
|
+
Open the MCP Servers panel and choose Configure to edit `cline_mcp_settings.json` (the file's location depends on how you run Cline; the CLI keeps it at `~/.cline/data/settings/cline_mcp_settings.json`):
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{ "mcpServers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Goose
|
|
164
|
+
|
|
165
|
+
[Add to Goose](goose://extension?cmd=npx&arg=-y&arg=mirasec&arg=mcp&id=mirasec&name=mirasec&description=Quantum-safe%20crypto%20scanner)
|
|
166
|
+
|
|
167
|
+
Or add this to `~/.config/goose/config.yaml` (`timeout` is in seconds):
|
|
168
|
+
|
|
169
|
+
```yaml
|
|
170
|
+
extensions:
|
|
171
|
+
mirasec: { type: stdio, name: mirasec, enabled: true, cmd: npx, args: ["-y", "mirasec", "mcp"], timeout: 300 }
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Amp
|
|
175
|
+
|
|
176
|
+
`~/.config/amp/settings.json` (a workspace `.amp/settings.json` needs your approval):
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{ "amp.mcpServers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Kiro
|
|
183
|
+
|
|
184
|
+
`~/.kiro/settings/mcp.json` or `.kiro/settings/mcp.json`:
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{ "mcpServers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### JetBrains Junie
|
|
191
|
+
|
|
192
|
+
`~/.junie/mcp/mcp.json` or `.junie/mcp/mcp.json`:
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{ "mcpServers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Roo Code
|
|
199
|
+
|
|
200
|
+
`.roo/mcp.json` in the project (the global `mcp_settings.json` lives in the extension's storage):
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{ "mcpServers": { "mirasec": { "command": "npx", "args": ["-y", "mirasec", "mcp"] } } }
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Other MCP clients: register a stdio server with the command `npx` and the arguments `-y mirasec mcp`. JetBrains AI Assistant takes the same `mcpServers` JSON in Settings, Tools, AI Assistant, MCP.
|
|
207
|
+
|
|
208
|
+
### Docker
|
|
209
|
+
|
|
210
|
+
Mount the project at `/workspace` so the server can read it:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
docker run -i --rm -v "$PWD":/workspace ghcr.io/mirastacklabs-ai/mirasec
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
The image's default command is `mcp`, so the line above starts the stdio MCP server. As an MCP server entry, use `docker` as the command and `["run","-i","--rm","-v","/path/to/project:/workspace","ghcr.io/mirastacklabs-ai/mirasec"]` as the arguments.
|
|
217
|
+
|
|
218
|
+
### MCP tools
|
|
219
|
+
|
|
220
|
+
The server exposes 7 tools:
|
|
221
|
+
|
|
222
|
+
| Tool | Inputs | What it does |
|
|
223
|
+
|---|---|---|
|
|
224
|
+
| `scan_source` | `path` or `gitUrl` (+ `branch`), `projectName` (optional), `wait_seconds` (optional) | Scan a local folder or a git repository. Returns counts by quantum priority, top findings with file and line, and a CBOM ID. |
|
|
225
|
+
| `scan_endpoint` | `target` (`host:port`), `sni` (optional), `wait_seconds` (optional) | Scan a TLS endpoint. Returns TLS version, cipher suites, certificate summary, CVE checks and quantum findings. |
|
|
226
|
+
| `get_scan_status` | `scanId` | Status, timestamps and the error if the scan failed. |
|
|
227
|
+
| `get_cbom` | `scanId` or `cbomId`, `outputPath` (optional), `overwrite` (optional) | Write the CycloneDX JSON to `outputPath`, or return a summary with the document attached. The document is CycloneDX 1.6; mirasec extras live in `metadata.properties` as `mirasec:*` entries with JSON-string values. An existing `outputPath` is not replaced unless `overwrite` is `true`. |
|
|
228
|
+
| `get_quantum_readiness` | `scanId`, `profile` (optional: a jurisdiction deadline profile, default none) | Findings with reason, priority, recommended target algorithm and transition mode. |
|
|
229
|
+
| `list_scans` | `limit` (optional, default 20, max 100), `type` (optional: `sourcecode` or `endpoint`) | Recent scans, newest first. |
|
|
230
|
+
| `list_signatures` | `language` (optional) | Detection signature IDs and descriptions. |
|
|
231
|
+
|
|
232
|
+
The scan tools wait up to `wait_seconds` (default 25, maximum 50, kept under common client timeouts). If the scan is not done by then, they return a `scanId` with status `running`; call `get_scan_status` to follow up. A scan still running stops if the MCP client disconnects.
|
|
233
|
+
|
|
234
|
+
## Agent Skills
|
|
235
|
+
|
|
236
|
+
mirasec ships two skills in the open [Agent Skills](https://agentskills.io) format (a `SKILL.md` with `name` and `description` frontmatter): `quantum-scan` and `quantum-remediate`. They come from three places:
|
|
237
|
+
|
|
238
|
+
- **The Claude Code plugin** bundles them with the MCP server.
|
|
239
|
+
- **`mirasec setup <harness>`** copies them into the harness's skills directory (`--no-skills` skips this). Most harnesses read the shared `~/.agents/skills` or a project's `.agents/skills`; others have their own directory, listed in [docs/setup.md](docs/setup.md).
|
|
240
|
+
- **`.agents/skills/` in this repository** is the canonical copy. Copy a skill folder into your harness's skills directory by hand if you prefer.
|
|
241
|
+
|
|
242
|
+
## CLI and CI usage
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
mirasec scan source ./my-repo --out cbom.json
|
|
246
|
+
mirasec scan source https://github.com/example/repo.git --out cbom.json
|
|
247
|
+
mirasec scan endpoint example.com:443 --out cbom.json
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Add `--profile <id>` to show each finding's migration deadline under a jurisdiction (`nist-ir8547`, `us-eo14412`, `uk-ncsc`, `eu`, `ca-cccs`). The dates and quotes are in [docs/deadlines.md](docs/deadlines.md).
|
|
251
|
+
|
|
252
|
+
`mirasec scan` runs one scan in-process and writes the CBOM JSON to `--out`, or to stdout if `--out` is not given. A short summary goes to stderr. Exit codes:
|
|
253
|
+
|
|
254
|
+
| Code | Meaning |
|
|
255
|
+
|---|---|
|
|
256
|
+
| 0 | No quantum-vulnerable findings |
|
|
257
|
+
| 1 | Quantum-vulnerable findings |
|
|
258
|
+
| 2 | Usage error, failed scan or timeout |
|
|
259
|
+
|
|
260
|
+
That makes it usable as a CI gate:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
npx -y mirasec scan source . --out cbom.json # a non-zero exit fails the CI step
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Other commands:
|
|
267
|
+
|
|
268
|
+
- `mirasec mcp [--data-dir DIR]`: the stdio MCP server.
|
|
269
|
+
- `mirasec serve [--config FILE] [--addr 127.0.0.1:8020] [--allowed-host NAME]...`: the HTTP API. It binds to `127.0.0.1` by default and has no authentication; it warns if you bind a non-loopback address. See Limitations for the request guard and `--allowed-host`.
|
|
270
|
+
- `mirasec version`: version, commit and build date.
|
|
271
|
+
|
|
272
|
+
Scan data is stored in SQLite under the data directory. The directory is chosen in this order: `--data-dir`, `$MIRASEC_DATA_DIR`, `${CLAUDE_PLUGIN_DATA}`, then the user cache directory plus `mirasec`. MariaDB is opt-in (config file only) and experimental in v0.1.
|
|
273
|
+
|
|
274
|
+
Press Ctrl+C (SIGINT) to cancel running scans in `mirasec scan` and to shut `serve` down cleanly.
|
|
275
|
+
|
|
276
|
+
## Example output
|
|
277
|
+
|
|
278
|
+
Real output from `mirasec scan source testdata/fixtures/cryptoapp` (the small fixture in this repository; its Go, Java and Python files use RSA, EC and AES). The summary goes to stderr, the CBOM JSON to stdout, and the exit status is 1 because quantum-vulnerable findings were found:
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
scan 01a24a2c-cc67-7854-8708-352a47dea41e completed: 10 vulnerable finding(s) (P0=10)
|
|
282
|
+
[P0] RSA at Crypto.java:7: public_key_shor
|
|
283
|
+
[P0] EC at Crypto.java:11: public_key_shor
|
|
284
|
+
[P0] RSA at KeyGen.java:5: public_key_shor
|
|
285
|
+
[P0] RSA/ECB/PKCS1PADDING at Wrap.java:5: public_key_shor
|
|
286
|
+
[P0] RSA at crypto_util.py:4: public_key_shor
|
|
287
|
+
[P0] EC at crypto_util.py:4: public_key_shor
|
|
288
|
+
[P0] RSA at crypto_util.py:8: public_key_shor
|
|
289
|
+
[P0] EC at crypto_util.py:9: public_key_shor
|
|
290
|
+
[P0] RSA at main.go:15: public_key_shor
|
|
291
|
+
[P0] ECDSA at main.go:25: public_key_shor
|
|
292
|
+
exit status 1
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
An excerpt of the CBOM JSON on stdout (25 KB in total; the scan ID and the bom-refs differ on every run). Each algorithm is one component and lists every site in `evidence.occurrences`:
|
|
296
|
+
|
|
297
|
+
```json
|
|
298
|
+
{
|
|
299
|
+
"components": [
|
|
300
|
+
{
|
|
301
|
+
"bom-ref": "dd361438-ff76-5cef-a514-771c3fd4ba4b",
|
|
302
|
+
"cryptoProperties": {
|
|
303
|
+
"algorithmProperties": {
|
|
304
|
+
"cryptoFunctions": ["keygen", "encrypt", "decrypt", "sign", "verify"],
|
|
305
|
+
"primitive": "pke"
|
|
306
|
+
},
|
|
307
|
+
"assetType": "algorithm",
|
|
308
|
+
"oid": "1.2.840.113549.1.1.1"
|
|
309
|
+
},
|
|
310
|
+
"evidence": {
|
|
311
|
+
"occurrences": [
|
|
312
|
+
{
|
|
313
|
+
"additionalContext": "KeyPairGenerator rsa = KeyPairGenerator.getInstance(\"RSA\");",
|
|
314
|
+
"line": 7,
|
|
315
|
+
"location": "Crypto.java",
|
|
316
|
+
"offset": 32
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"additionalContext": "key, _ := rsa.GenerateKey(rand.Reader, 2048)",
|
|
320
|
+
"line": 15,
|
|
321
|
+
"location": "main.go",
|
|
322
|
+
"offset": 12
|
|
323
|
+
},
|
|
324
|
+
...
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
"name": "RSA",
|
|
328
|
+
"properties": [{ "name": "mirasec:language", "value": "go,java,python" }],
|
|
329
|
+
"type": "cryptographic-asset"
|
|
330
|
+
},
|
|
331
|
+
...
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Counts, priorities and the findings themselves depend on your code and the scanner version.
|
|
335
|
+
|
|
336
|
+
The full CBOM for this fixture is in [docs/examples/cbom-cryptoapp.json](docs/examples/cbom-cryptoapp.json); mirasec's tests validate it against the official CycloneDX 1.6 JSON schema.
|
|
337
|
+
|
|
338
|
+
## Limitations
|
|
339
|
+
|
|
340
|
+
- **Detection is rule-based.** Source detection uses regex and manifest rules, not data-flow analysis. Expect false positives and misses. An absence of findings is not proof that code is safe.
|
|
341
|
+
- Source scans find crypto that is visible in code and manifests. They do not produce a full software bill of materials.
|
|
342
|
+
- Live progress events are per process. With several `serve` instances sharing one MariaDB database, an instance that did not run the scan reads its events from the database.
|
|
343
|
+
- `mirasec serve` has no authentication. It binds to `127.0.0.1` by default and warns on any other address. Only bind it elsewhere on a network you trust.
|
|
344
|
+
- `serve` accepts only `https://`, `ssh://` and `git@` git URLs, but it can still reach internal hosts such as `https://localhost`. Who may call the API, and so which hosts it may reach, is the operator's responsibility.
|
|
345
|
+
- `serve` guards every route against browser attacks (CSRF and DNS rebinding). The `Host` header must be `localhost`, `127.0.0.1` or `[::1]` on a loopback bind (421 otherwise). On a non-loopback bind only the bind host and the names you pass with `--allowed-host` (repeatable) are accepted, so behind a proxy or in Docker add every name clients use. A request with an `Origin` header that is not same-origin is refused (403). `POST`, `PUT`, `PATCH` and `DELETE` need `Content-Type: application/json` (415). `curl` and other non-browser clients are unaffected as long as they send that header. Server-Sent Events (`GET .../events`) work as before.
|
|
346
|
+
- git URLs with credentials (`https://user:token@host/...`) are rejected, so tokens never reach logs or the scan list. `ssh://` and `git@host:path` URLs use the SSH agent of the user running mirasec, so a caller of `serve` (or an MCP client) can clone anything those keys reach. Treat `serve` as a tool for trusted callers only.
|
|
347
|
+
- Queue mode of `serve` (several instances on one MariaDB) is at-least-once: after a crash or a stalled lease a scan can run again, and a job can be picked up by two workers in rare races. Results are idempotent per scan id, but a scan can be repeated.
|
|
348
|
+
- MariaDB storage is opt-in and experimental in v0.1. SQLite is the default and the tested path.
|
|
349
|
+
- Network scanning (CIDR ranges, port discovery) arrives in v0.2. See the [roadmap](docs/roadmap.md).
|
|
350
|
+
|
|
351
|
+
## Responsible use
|
|
352
|
+
|
|
353
|
+
Scan only code, hosts and networks that you own or are authorized to test.
|
|
354
|
+
|
|
355
|
+
## Documentation
|
|
356
|
+
|
|
357
|
+
- [Setup for each harness](docs/setup.md)
|
|
358
|
+
- [Architecture](docs/architecture.md)
|
|
359
|
+
- [Signatures](docs/signatures.md)
|
|
360
|
+
- [Dependency licenses](docs/licenses.md)
|
|
361
|
+
- [Verify a release](docs/verify.md) (signatures, provenance, SBOMs)
|
|
362
|
+
- [Roadmap](docs/roadmap.md)
|
|
363
|
+
- [Contributing](CONTRIBUTING.md), [Security](SECURITY.md), [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
364
|
+
|
|
365
|
+
## License
|
|
366
|
+
|
|
367
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
package/bin/mirasec.exe
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirastacklabs/mirasec-windows-amd64",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "mirasec binary for windows/amd64",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/mirastacklabs-ai/mirasec.git"
|
|
9
|
+
},
|
|
10
|
+
"os": [
|
|
11
|
+
"win32"
|
|
12
|
+
],
|
|
13
|
+
"cpu": [
|
|
14
|
+
"x64"
|
|
15
|
+
],
|
|
16
|
+
"files": [
|
|
17
|
+
"bin",
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"README.md"
|
|
20
|
+
]
|
|
21
|
+
}
|