opencode-codex-security 0.1.1 → 0.1.2
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/README.md +29 -31
- package/dist/gui-experimental.cjs +8 -8
- package/docs/GLOBAL-CONFIG.md +82 -6
- package/docs/PUBLISHING.md +40 -29
- package/docs/RELEASING.md +4 -4
- package/docs/SDK.md +21 -9
- package/package.json +2 -1
- package/src/core/codex-adapter.ts +29 -19
- package/src/core/credential-guard.ts +47 -0
- package/src/core/planned-scan.ts +32 -1
- package/src/core/provider-config.ts +254 -0
- package/src/core/scan-plan.ts +3 -2
- package/src/core/sdk-settings.ts +135 -11
- package/src/core/security-operations.ts +16 -16
- package/src/operation-tools.ts +9 -3
- package/src/plan-view.ts +16 -1
- package/src/plugin.ts +5 -1
- package/src/security-operations-panel.tsx +6 -3
- package/src/security-panel.tsx +6 -5
- package/src/security-tui-operations.tsx +3 -2
- package/src/tui.tsx +3 -2
package/src/security-panel.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { createMemo, createSignal, createEffect, on, For, Show, onCleanup } from
|
|
|
2
2
|
import { createStore, reconcile } from 'solid-js/store';
|
|
3
3
|
import { asState, type ScanState } from './types';
|
|
4
4
|
import type { ScanInputs, ScanPlan } from './core/scan-plan';
|
|
5
|
-
import { describePlan, latestAvailableDraft } from './plan-view';
|
|
5
|
+
import { describeInferenceRoute, describePlan, latestAvailableDraft } from './plan-view';
|
|
6
6
|
import {
|
|
7
7
|
elapsedLabel,
|
|
8
8
|
findingText,
|
|
@@ -507,7 +507,7 @@ export function SecurityPanel(props: {
|
|
|
507
507
|
>
|
|
508
508
|
{busy() === 'prepare' ? 'Preparing preview…' : 'Review scan'}
|
|
509
509
|
</button>
|
|
510
|
-
<span class="gs-muted gs-small">
|
|
510
|
+
<span class="gs-muted gs-small">No source has been sent yet.</span>
|
|
511
511
|
</div>
|
|
512
512
|
</form>
|
|
513
513
|
}
|
|
@@ -564,8 +564,9 @@ export function SecurityPanel(props: {
|
|
|
564
564
|
fallback={
|
|
565
565
|
<>
|
|
566
566
|
<p>
|
|
567
|
-
Repository source and listed context will be sent to
|
|
568
|
-
are stored
|
|
567
|
+
Repository source and listed context will be sent to{}
|
|
568
|
+
{describeInferenceRoute(plan().settings)}. Results are stored
|
|
569
|
+
locally.
|
|
569
570
|
</p>
|
|
570
571
|
<p>
|
|
571
572
|
Estimated cost stop:{' '}
|
|
@@ -991,7 +992,7 @@ export function SecurityPanel(props: {
|
|
|
991
992
|
<footer class="gs-footer">
|
|
992
993
|
{fixture()
|
|
993
994
|
? 'Fixture engine · not a security assessment'
|
|
994
|
-
: 'Codex Security · local results,
|
|
995
|
+
: 'Codex Security · local results, configured inference'}
|
|
995
996
|
<Show when={catalog().runs.length}>
|
|
996
997
|
{' '}
|
|
997
998
|
· Up to {catalog().maxConcurrent} concurrent scans per project
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource @opentui/solid */
|
|
2
|
+
import { describeInferenceRoute } from './plan-view';
|
|
2
3
|
import type { Plugin } from '@opencode/plugin/tui';
|
|
3
4
|
type Context = Plugin.Context;
|
|
4
5
|
type Commands = NonNullable<ReturnType<Parameters<Context['keymap']['layer']>[0]>['commands']>;
|
|
@@ -66,7 +67,7 @@ export function createTuiOperations(
|
|
|
66
67
|
const approve = async (op: SecurityOperationState) => {
|
|
67
68
|
const confirmed = await ctx.ui.dialog.confirm({
|
|
68
69
|
title: op.kind === 'policy' ? 'Review policy generation' : 'Review source validation',
|
|
69
|
-
message: `Repository: ${op.repository}\n${op.plan.path ? 'Component: ' + op.plan.path + '\n' : ''}Context: ${op.plan.contextFiles.map((file) => file.path).join(', ') || 'No additional documents'}\n\n${op.plan.mock ? 'Mock operation: no model calls or uploads.' : `Repository source, the selected finding if any, and listed context go to
|
|
70
|
+
message: `Repository: ${op.repository}\n${op.plan.path ? 'Component: ' + op.plan.path + '\n' : ''}Context: ${op.plan.contextFiles.map((file) => file.path).join(', ') || 'No additional documents'}\n\n${op.plan.mock ? 'Mock operation: no model calls or uploads.' : `Repository source, the selected finding if any, and listed context go to ${describeInferenceRoute(op.plan.settings)}.\n${op.plan.costNotice}`}\n\n${op.kind === 'policy' ? 'Returns a draft only. Existing files stay unchanged.' : 'Static source assessment only. No exploit execution or patch application.'}\n\nModel: ${op.plan.settings.codex.model} · ${op.plan.settings.codex.reasoningEffort} reasoning`,
|
|
70
71
|
label: {
|
|
71
72
|
confirm: op.plan.mock
|
|
72
73
|
? 'Start mock operation'
|
|
@@ -218,7 +219,7 @@ export function createTuiOperations(
|
|
|
218
219
|
title: 'Answer security questions',
|
|
219
220
|
description:
|
|
220
221
|
question.questions.map((q, index) => `${index + 1}. ${q}`).join('\n') +
|
|
221
|
-
|
|
222
|
+
`\n\nAnswer each question or state what is unknown. Your answer will be sent to the already-approved route: ${describeInferenceRoute(op.plan.settings)}. Do not include secrets.`,
|
|
222
223
|
});
|
|
223
224
|
if (!answer?.trim() || stopped) return;
|
|
224
225
|
await client.operationAnswer(
|
package/src/tui.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import { asState, type ScanList } from './types';
|
|
|
6
6
|
import type { ScanInputs, ScanPlan } from './core/scan-plan';
|
|
7
7
|
import {
|
|
8
8
|
describePlan,
|
|
9
|
+
describeInferenceRoute,
|
|
9
10
|
isAbsoluteLocalDirectory,
|
|
10
11
|
latestAvailableDraft,
|
|
11
12
|
withScanMode,
|
|
@@ -137,8 +138,8 @@ export default Plugin.define({
|
|
|
137
138
|
}
|
|
138
139
|
>
|
|
139
140
|
<text>
|
|
140
|
-
Repository source and listed context will be sent to
|
|
141
|
-
local.
|
|
141
|
+
Repository source and listed context will be sent to{}
|
|
142
|
+
{describeInferenceRoute(plan.settings)}. Results stay local.
|
|
142
143
|
</text>
|
|
143
144
|
<text>
|
|
144
145
|
Estimated stop: USD {plan.settings.scan.maxCostUsd} for this scan. Not a hard
|