fullcourtdefense-cli 1.35.2 → 1.35.3
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/dist/actionPolicyEngine.js +88 -8
- package/dist/approvalPrompt.d.ts +3 -0
- package/dist/approvalPrompt.js +20 -1
- package/dist/blockExplanation.js +17 -0
- package/dist/commandNarrative.d.ts +29 -0
- package/dist/commandNarrative.js +602 -0
- package/dist/commands/workloadProtect.d.ts +10 -0
- package/dist/commands/workloadProtect.js +27 -4
- package/dist/detectorBaseline.d.ts +2 -2
- package/dist/detectorBaseline.js +2 -2
- package/dist/devConfirm.js +7 -2
- package/dist/index.js +4 -0
- package/dist/version.json +1 -1
- package/package.json +1 -1
package/dist/devConfirm.js
CHANGED
|
@@ -163,7 +163,8 @@ function dialogCardHtml(view, options) {
|
|
|
163
163
|
h1{margin:0 0 4px;font-size:22px}.sub{color:#64748b;margin:0 0 14px}
|
|
164
164
|
.box{border:1px solid #e2e8f0;border-radius:12px;padding:12px 14px;margin:0 0 10px;background:#f8fafc}
|
|
165
165
|
h2{margin:0 0 6px;font-size:13px}.k{color:#64748b;font-size:11px;font-weight:700}
|
|
166
|
-
.action{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;white-space:pre-wrap;word-break:break-word;background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:8px 10px}
|
|
166
|
+
.action{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;white-space:pre-wrap;word-break:break-word;background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:8px 10px;max-height:180px;overflow:auto}
|
|
167
|
+
.steps{margin:0 0 8px}.steps li{margin:3px 0}.steps .n{color:#64748b;font-weight:700;min-width:18px}
|
|
167
168
|
ul{list-style:none;margin:0;padding:0}li{display:flex;gap:8px;margin:6px 0}
|
|
168
169
|
.dot{width:8px;height:8px;border-radius:50%;margin-top:6px;flex:none}
|
|
169
170
|
.row{display:flex;justify-content:flex-end;gap:8px;align-items:center;margin-top:14px;flex-wrap:wrap}
|
|
@@ -180,6 +181,7 @@ button{font:600 13px/1 -apple-system,Segoe UI,sans-serif;border-radius:8px;paddi
|
|
|
180
181
|
</div></div>
|
|
181
182
|
<div class="box"><h2>Action</h2>
|
|
182
183
|
${view.kind ? `<div class="k">${htmlEsc(view.kind)}</div>` : ''}
|
|
184
|
+
${view.steps.length ? `<div class="k" style="margin-top:6px">What it does</div><ol class="steps">${view.steps.map((step, index) => `<li><span class="n">${index + 1}.</span>${htmlEsc(step)}</li>`).join('')}</ol><div class="k">Full script</div>` : ''}
|
|
183
185
|
${view.action ? `<div class="action">${htmlEsc(view.action)}</div>` : '<p class="sub">The action is described in the IDE message.</p>'}
|
|
184
186
|
</div>
|
|
185
187
|
${view.policy ? `<div class="box"><h2>Matched policy</h2><div><span class="k">Policy</span> ${htmlEsc(view.policy)}</div>${view.scope ? `<div><span class="k">Scope</span> ${htmlEsc(view.scope)}</div>` : ''}</div>` : ''}
|
|
@@ -224,7 +226,10 @@ function windowsDialogScript(message, timeoutSeconds, options, title, view) {
|
|
|
224
226
|
"$s=AddLabel $root ([string]$v.subtitle) (New-Object Drawing.Font('Segoe UI',9.75)) $muted ($h.Bottom+4) $hw $hx; $y=[Math]::Max($icon.Bottom,$s.Bottom)+18",
|
|
225
227
|
"AddLabel $root 'Action' (New-Object Drawing.Font('Segoe UI',9.75,[Drawing.FontStyle]::Bold)) $ink $y $w | Out-Null; $y+=22",
|
|
226
228
|
"if($v.kind){ AddLabel $root ([string]$v.kind) (New-Object Drawing.Font('Segoe UI',8.25,[Drawing.FontStyle]::Bold)) $muted $y $w | Out-Null; $y+=18 }",
|
|
227
|
-
|
|
229
|
+
// What it does: one numbered plain-words line per step, then the FULL script in a
|
|
230
|
+
// read-only scrolling box (fixed height, so a long script never pushes the buttons away).
|
|
231
|
+
"$steps=@($v.steps); if($steps.Count -gt 0){ AddLabel $root 'What it does' (New-Object Drawing.Font('Segoe UI',8.25,[Drawing.FontStyle]::Bold)) $muted $y $w | Out-Null; $y+=18; $n=0; foreach($st in $steps){ $n++; $row=AddLabel $root (\"$n. $st\") (New-Object Drawing.Font('Segoe UI',9.75)) $ink $y $w; $y=$row.Bottom+2 }; $y+=6; AddLabel $root 'Full script' (New-Object Drawing.Font('Segoe UI',8.25,[Drawing.FontStyle]::Bold)) $muted $y $w | Out-Null; $y+=18 }",
|
|
232
|
+
"if($v.action){ $a=New-Object Windows.Forms.TextBox; $a.Multiline=$true; $a.ReadOnly=$true; $a.WordWrap=$true; $a.ScrollBars='Vertical'; $a.BorderStyle='FixedSingle'; $a.BackColor=[Drawing.Color]::FromArgb(248,250,252); $a.ForeColor=$ink; $a.Font=New-Object Drawing.Font('Consolas',9.75); $a.Text=[string]$v.action; $lines=[Math]::Max(1,[Math]::Min(9,([string]$v.action).Length/80+([string]$v.action).Split([char]10).Count)); $a.Size=New-Object Drawing.Size($w,[int](18*$lines+12)); $a.Location=New-Object Drawing.Point($x0,$y); $a.TabStop=$false; $root.Controls.Add($a); $y=$a.Bottom+12 } else { $y+=8 }",
|
|
228
233
|
"if($v.policy){ AddLabel $root 'Matched policy' (New-Object Drawing.Font('Segoe UI',9.75,[Drawing.FontStyle]::Bold)) $ink $y $w | Out-Null; $y+=22; $pn=AddLabel $root ([string]$v.policy) (New-Object Drawing.Font('Segoe UI',9.75)) $ink $y $w; $y=$pn.Bottom+2; if($v.scope){ $ps=AddLabel $root ([string]$v.scope) (New-Object Drawing.Font('Segoe UI',9)) $muted $y $w; $y=$ps.Bottom+12 } }",
|
|
229
234
|
"AddLabel $root 'Why it triggered' (New-Object Drawing.Font('Segoe UI',9.75,[Drawing.FontStyle]::Bold)) $ink $y $w | Out-Null; $y+=22",
|
|
230
235
|
"foreach($item in @($v.why)){ $row=AddLabel $root ('• '+$item) (New-Object Drawing.Font('Segoe UI',9.75)) $ink $y $w; $y=$row.Bottom+2 }",
|
package/dist/index.js
CHANGED
|
@@ -197,6 +197,9 @@ function printHelp() {
|
|
|
197
197
|
fleet expires it automatically after --ttl-hours of silence.
|
|
198
198
|
Add --http-gateway true to also gate the agent's direct API calls
|
|
199
199
|
(starts http-gateway; the env file gains HTTP_PROXY / HTTPS_PROXY).
|
|
200
|
+
--enrolled-via <heroku|kubernetes|aws|gcp> (or FCD_ENROLLED_VIA)
|
|
201
|
+
files the row under that connection in the console; Heroku dynos
|
|
202
|
+
are detected from DYNO / HEROKU_APP_NAME.
|
|
200
203
|
Auth: FCD_API_KEY secret (org API key).
|
|
201
204
|
approve Resolve a taint-guard "approve once" request from YOUR terminal.
|
|
202
205
|
When the hook holds an agent action (unrequested network/git
|
|
@@ -737,6 +740,7 @@ async function main() {
|
|
|
737
740
|
force: flags.force,
|
|
738
741
|
httpGateway: flags['http-gateway'],
|
|
739
742
|
agentName: flags['agent-name'],
|
|
743
|
+
enrolledVia: flags['enrolled-via'],
|
|
740
744
|
};
|
|
741
745
|
const { workloadProtectCommand } = await Promise.resolve().then(() => __importStar(require('./commands/workloadProtect')));
|
|
742
746
|
await workloadProtectCommand(args, config);
|
package/dist/version.json
CHANGED