conbridge-agent 0.8.0 → 0.8.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/README.md +1 -1
- package/conbridge-agent.cjs +339 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# conbridge-agent
|
|
2
2
|
|
|
3
|
-
ConBridge Desktop Agent 0.8.
|
|
3
|
+
ConBridge Desktop Agent 0.8.1: connects a computer or server to ConBridge so the AI apps you approve (ChatGPT,
|
|
4
4
|
Claude) can use the folders you share, or, with full access, its terminal. macOS, Linux (servers too), Raspberry Pi and
|
|
5
5
|
Windows; Node.js 22 or later.
|
|
6
6
|
|
package/conbridge-agent.cjs
CHANGED
|
@@ -29,7 +29,7 @@ __export(cli_exports, {
|
|
|
29
29
|
module.exports = __toCommonJS(cli_exports);
|
|
30
30
|
|
|
31
31
|
// <define:__CONBRIDGE_BUILD__>
|
|
32
|
-
var define_CONBRIDGE_BUILD_default = { version: "0.8.
|
|
32
|
+
var define_CONBRIDGE_BUILD_default = { version: "0.8.1", commit: "18da9064eede", built_at: "2026-11-12T23:54:03.139Z", keychain_helper_sha256: "0a2d65388c0acc75305386ce0d6b7ee2e522ed939f291eb5a50055197674c023", distribution: "npm" };
|
|
33
33
|
|
|
34
34
|
// dist/cli.js
|
|
35
35
|
var import_promises22 = require("node:readline/promises");
|
|
@@ -20896,7 +20896,8 @@ var INTEL_PENDING_REASONS = [
|
|
|
20896
20896
|
"query_failed",
|
|
20897
20897
|
"record_missing",
|
|
20898
20898
|
"record_unstorable",
|
|
20899
|
-
"record_unchecked_for_package"
|
|
20899
|
+
"record_unchecked_for_package",
|
|
20900
|
+
"query_too_large"
|
|
20900
20901
|
];
|
|
20901
20902
|
var CPE_PRODUCTS = Object.freeze({
|
|
20902
20903
|
node: { cpe: "nodejs:node.js", scheme: "semver", name: "Node.js", releases: "node", packaged: /^nodejs$/ },
|
|
@@ -21106,6 +21107,202 @@ function compareDpkgVersions(a, b) {
|
|
|
21106
21107
|
return sign(compareEpochs(left.epoch, right.epoch) || verrevcmp(left.upstream, right.upstream) || verrevcmp(left.revision, right.revision));
|
|
21107
21108
|
}
|
|
21108
21109
|
|
|
21110
|
+
// ../../packages/protocol/dist/security/apk-version.js
|
|
21111
|
+
var MAX_VERSION_LENGTH2 = 128;
|
|
21112
|
+
var UINT64_MAX = "18446744073709551615";
|
|
21113
|
+
var Token = {
|
|
21114
|
+
InitialDigit: 0,
|
|
21115
|
+
Digit: 1,
|
|
21116
|
+
Letter: 2,
|
|
21117
|
+
Suffix: 3,
|
|
21118
|
+
SuffixNo: 4,
|
|
21119
|
+
CommitHash: 5,
|
|
21120
|
+
RevisionNo: 6,
|
|
21121
|
+
End: 7
|
|
21122
|
+
};
|
|
21123
|
+
var SUFFIXES = ["alpha", "beta", "pre", "rc", "", "cvs", "svn", "git", "hg", "p"];
|
|
21124
|
+
var SUFFIX_NONE = 4;
|
|
21125
|
+
function isDigit2(char) {
|
|
21126
|
+
return char >= "0" && char <= "9";
|
|
21127
|
+
}
|
|
21128
|
+
function isLower(char) {
|
|
21129
|
+
return char >= "a" && char <= "z";
|
|
21130
|
+
}
|
|
21131
|
+
function isHex(char) {
|
|
21132
|
+
return isDigit2(char) || char >= "a" && char <= "f";
|
|
21133
|
+
}
|
|
21134
|
+
function span(text6, start, accept) {
|
|
21135
|
+
let end = start;
|
|
21136
|
+
while (end < text6.length && accept(text6.charAt(end)))
|
|
21137
|
+
end++;
|
|
21138
|
+
return end;
|
|
21139
|
+
}
|
|
21140
|
+
function validNumber(digits) {
|
|
21141
|
+
if (digits.length === 0)
|
|
21142
|
+
return false;
|
|
21143
|
+
const trimmed = digits.replace(/^0+/, "");
|
|
21144
|
+
return trimmed.length < UINT64_MAX.length || trimmed.length === UINT64_MAX.length && trimmed <= UINT64_MAX;
|
|
21145
|
+
}
|
|
21146
|
+
function tokenize(version3) {
|
|
21147
|
+
const tokens = [];
|
|
21148
|
+
let position2 = span(version3, 0, isDigit2);
|
|
21149
|
+
const initial = version3.slice(0, position2);
|
|
21150
|
+
if (!validNumber(initial))
|
|
21151
|
+
return null;
|
|
21152
|
+
tokens.push({ type: Token.InitialDigit, value: initial, suffix: 0 });
|
|
21153
|
+
let previous = Token.InitialDigit;
|
|
21154
|
+
while (position2 < version3.length) {
|
|
21155
|
+
const char = version3.charAt(position2);
|
|
21156
|
+
let type;
|
|
21157
|
+
let value;
|
|
21158
|
+
let suffix = 0;
|
|
21159
|
+
if (isLower(char)) {
|
|
21160
|
+
if (previous > Token.Digit)
|
|
21161
|
+
return null;
|
|
21162
|
+
type = Token.Letter;
|
|
21163
|
+
value = char;
|
|
21164
|
+
position2++;
|
|
21165
|
+
} else if (char === "." || isDigit2(char)) {
|
|
21166
|
+
if (char === ".") {
|
|
21167
|
+
if (previous > Token.Digit)
|
|
21168
|
+
return null;
|
|
21169
|
+
position2++;
|
|
21170
|
+
}
|
|
21171
|
+
if (previous === Token.InitialDigit || previous === Token.Digit)
|
|
21172
|
+
type = Token.Digit;
|
|
21173
|
+
else if (previous === Token.Suffix)
|
|
21174
|
+
type = Token.SuffixNo;
|
|
21175
|
+
else
|
|
21176
|
+
return null;
|
|
21177
|
+
const end = span(version3, position2, isDigit2);
|
|
21178
|
+
value = version3.slice(position2, end);
|
|
21179
|
+
if (!validNumber(value))
|
|
21180
|
+
return null;
|
|
21181
|
+
position2 = end;
|
|
21182
|
+
} else if (char === "_") {
|
|
21183
|
+
if (previous > Token.SuffixNo)
|
|
21184
|
+
return null;
|
|
21185
|
+
const end = span(version3, position2 + 1, isLower);
|
|
21186
|
+
value = version3.slice(position2 + 1, end);
|
|
21187
|
+
suffix = value.length === 0 ? -1 : SUFFIXES.indexOf(value);
|
|
21188
|
+
if (suffix < 0 || suffix === SUFFIX_NONE)
|
|
21189
|
+
return null;
|
|
21190
|
+
type = Token.Suffix;
|
|
21191
|
+
position2 = end;
|
|
21192
|
+
} else if (char === "~") {
|
|
21193
|
+
if (previous >= Token.CommitHash)
|
|
21194
|
+
return null;
|
|
21195
|
+
const end = span(version3, position2 + 1, isHex);
|
|
21196
|
+
value = version3.slice(position2 + 1, end);
|
|
21197
|
+
if (value.length === 0)
|
|
21198
|
+
return null;
|
|
21199
|
+
type = Token.CommitHash;
|
|
21200
|
+
position2 = end;
|
|
21201
|
+
} else if (char === "-") {
|
|
21202
|
+
if (previous >= Token.RevisionNo || version3.charAt(position2 + 1) !== "r")
|
|
21203
|
+
return null;
|
|
21204
|
+
const end = span(version3, position2 + 2, isDigit2);
|
|
21205
|
+
value = version3.slice(position2 + 2, end);
|
|
21206
|
+
if (!validNumber(value))
|
|
21207
|
+
return null;
|
|
21208
|
+
type = Token.RevisionNo;
|
|
21209
|
+
position2 = end;
|
|
21210
|
+
} else {
|
|
21211
|
+
return null;
|
|
21212
|
+
}
|
|
21213
|
+
tokens.push({ type, value, suffix });
|
|
21214
|
+
previous = type;
|
|
21215
|
+
}
|
|
21216
|
+
return tokens;
|
|
21217
|
+
}
|
|
21218
|
+
function sign2(value) {
|
|
21219
|
+
return value < 0 ? -1 : value > 0 ? 1 : 0;
|
|
21220
|
+
}
|
|
21221
|
+
function compareNumbers(a, b) {
|
|
21222
|
+
const left = a.replace(/^0+/, "");
|
|
21223
|
+
const right = b.replace(/^0+/, "");
|
|
21224
|
+
if (left.length !== right.length)
|
|
21225
|
+
return left.length < right.length ? -1 : 1;
|
|
21226
|
+
return left === right ? 0 : left < right ? -1 : 1;
|
|
21227
|
+
}
|
|
21228
|
+
function compareStrings(a, b) {
|
|
21229
|
+
return a === b ? 0 : a < b ? -1 : 1;
|
|
21230
|
+
}
|
|
21231
|
+
function compareTokens(a, b) {
|
|
21232
|
+
switch (a.type) {
|
|
21233
|
+
case Token.Digit:
|
|
21234
|
+
if (a.value.startsWith("0") || b.value.startsWith("0"))
|
|
21235
|
+
return compareStrings(a.value, b.value);
|
|
21236
|
+
return compareNumbers(a.value, b.value);
|
|
21237
|
+
case Token.InitialDigit:
|
|
21238
|
+
case Token.SuffixNo:
|
|
21239
|
+
case Token.RevisionNo:
|
|
21240
|
+
return compareNumbers(a.value, b.value);
|
|
21241
|
+
case Token.Suffix:
|
|
21242
|
+
return sign2(a.suffix - b.suffix);
|
|
21243
|
+
default:
|
|
21244
|
+
return compareStrings(a.value, b.value);
|
|
21245
|
+
}
|
|
21246
|
+
}
|
|
21247
|
+
function acceptable(value) {
|
|
21248
|
+
return typeof value === "string" && value.length > 0 && value.length <= MAX_VERSION_LENGTH2;
|
|
21249
|
+
}
|
|
21250
|
+
function compareApkVersions(a, b) {
|
|
21251
|
+
if (!acceptable(a) || !acceptable(b))
|
|
21252
|
+
return null;
|
|
21253
|
+
const left = tokenize(a);
|
|
21254
|
+
const right = tokenize(b);
|
|
21255
|
+
if (left === null || right === null)
|
|
21256
|
+
return null;
|
|
21257
|
+
let index = 0;
|
|
21258
|
+
for (; index < left.length && index < right.length; index++) {
|
|
21259
|
+
const ta2 = left[index];
|
|
21260
|
+
const tb2 = right[index];
|
|
21261
|
+
if (ta2.type !== tb2.type)
|
|
21262
|
+
break;
|
|
21263
|
+
const result2 = compareTokens(ta2, tb2);
|
|
21264
|
+
if (result2 !== 0)
|
|
21265
|
+
return result2;
|
|
21266
|
+
}
|
|
21267
|
+
const ta = left[index];
|
|
21268
|
+
const tb = right[index];
|
|
21269
|
+
const typeA = ta === void 0 ? Token.End : ta.type;
|
|
21270
|
+
const typeB = tb === void 0 ? Token.End : tb.type;
|
|
21271
|
+
if (typeA === typeB)
|
|
21272
|
+
return 0;
|
|
21273
|
+
if (ta !== void 0 && ta.type === Token.Suffix && ta.suffix < SUFFIX_NONE)
|
|
21274
|
+
return -1;
|
|
21275
|
+
if (tb !== void 0 && tb.type === Token.Suffix && tb.suffix < SUFFIX_NONE)
|
|
21276
|
+
return 1;
|
|
21277
|
+
return typeA > typeB ? -1 : 1;
|
|
21278
|
+
}
|
|
21279
|
+
|
|
21280
|
+
// ../../packages/protocol/dist/security/osv-ranges.js
|
|
21281
|
+
function distroComparatorOf(ecosystem) {
|
|
21282
|
+
if (typeof ecosystem !== "string")
|
|
21283
|
+
return null;
|
|
21284
|
+
if (ecosystem === "Alpine" || ecosystem.startsWith("Alpine:"))
|
|
21285
|
+
return compareApkVersions;
|
|
21286
|
+
if (ecosystem === "Debian" || ecosystem.startsWith("Debian:"))
|
|
21287
|
+
return compareDpkgVersions;
|
|
21288
|
+
if (ecosystem === "Ubuntu" || ecosystem.startsWith("Ubuntu:"))
|
|
21289
|
+
return compareDpkgVersions;
|
|
21290
|
+
return null;
|
|
21291
|
+
}
|
|
21292
|
+
var epochOf = (version3) => /^(\d+):/.exec(version3)?.[1] ?? "0";
|
|
21293
|
+
function distroAtOrBelow(ecosystem, fix, version3) {
|
|
21294
|
+
const cmp = distroComparatorOf(ecosystem);
|
|
21295
|
+
if (cmp === null || typeof fix !== "string" || typeof version3 !== "string")
|
|
21296
|
+
return false;
|
|
21297
|
+
if (cmp === compareDpkgVersions && epochOf(fix) !== epochOf(version3))
|
|
21298
|
+
return false;
|
|
21299
|
+
const order2 = cmp(fix, version3);
|
|
21300
|
+
return order2 === -1 || order2 === 0;
|
|
21301
|
+
}
|
|
21302
|
+
function carriesEveryDistroFix(ecosystem, fixed, version3) {
|
|
21303
|
+
return Array.isArray(fixed) && fixed.length > 0 && fixed.every((fix) => distroAtOrBelow(ecosystem, fix, version3));
|
|
21304
|
+
}
|
|
21305
|
+
|
|
21109
21306
|
// ../../packages/protocol/dist/security/redact.js
|
|
21110
21307
|
var LOG_TEMPLATE_MAX = 300;
|
|
21111
21308
|
var WHITESPACE_RUN = /[ \t\r\n\f\v]+/g;
|
|
@@ -21470,7 +21667,7 @@ function ratingOfCvss(score) {
|
|
|
21470
21667
|
var WINDOWS_ECOSYSTEM = "windows";
|
|
21471
21668
|
|
|
21472
21669
|
// ../../packages/protocol/dist/security/components.js
|
|
21473
|
-
var COMPONENT_RULES_VERSION = "2026-11-
|
|
21670
|
+
var COMPONENT_RULES_VERSION = "2026-11-13.3";
|
|
21474
21671
|
var DAEMON_PACKAGES = Object.freeze([
|
|
21475
21672
|
"openssh-server",
|
|
21476
21673
|
"postfix",
|
|
@@ -21535,7 +21732,7 @@ var PLATFORM_NAMES = Object.freeze({
|
|
|
21535
21732
|
});
|
|
21536
21733
|
|
|
21537
21734
|
// ../../packages/protocol/dist/security/buckets.js
|
|
21538
|
-
var BUCKET_RULES_VERSION = "2026-11-
|
|
21735
|
+
var BUCKET_RULES_VERSION = "2026-11-13.3";
|
|
21539
21736
|
var FINDING_BUCKETS = ["action_required", "waiting_vendor", "verify", "low"];
|
|
21540
21737
|
var OPEN = /* @__PURE__ */ new Set(["confirmed", "potential", "unknown"]);
|
|
21541
21738
|
var LOW_RATINGS = /* @__PURE__ */ new Set(["low", "negligible"]);
|
|
@@ -21543,6 +21740,8 @@ function bucketOf(row) {
|
|
|
21543
21740
|
if (!OPEN.has(row.class))
|
|
21544
21741
|
return null;
|
|
21545
21742
|
const fix = row.fix_state ?? "unknown";
|
|
21743
|
+
if (row.verify_reason === "client_only")
|
|
21744
|
+
return { bucket: "verify", rule: 4, route: null, urgent: row.kev, reason: "client_only" };
|
|
21546
21745
|
if (row.kev && (row.class === "confirmed" || row.class === "potential")) {
|
|
21547
21746
|
return fix === "fix" ? { bucket: "action_required", rule: 1, route: "fix", urgent: false } : { bucket: "verify", rule: 1, route: null, urgent: true };
|
|
21548
21747
|
}
|
|
@@ -21554,13 +21753,15 @@ function bucketOf(row) {
|
|
|
21554
21753
|
return { bucket: "verify", rule: 4, route: null, urgent: false };
|
|
21555
21754
|
return { bucket: "low", rule: 5, route: null, urgent: false };
|
|
21556
21755
|
}
|
|
21557
|
-
var BUCKET_RULES_VERSION_V2 = "2026-11-
|
|
21756
|
+
var BUCKET_RULES_VERSION_V2 = "2026-11-13.3.v2";
|
|
21558
21757
|
var FINDING_BUCKETS_V2 = [...FINDING_BUCKETS, "accepted"];
|
|
21559
21758
|
function bucketOfV2(row) {
|
|
21560
21759
|
if (!OPEN.has(row.class) || row.applicability === "not_affected")
|
|
21561
21760
|
return null;
|
|
21562
21761
|
const urgent = row.kev || row.vendor_critical && row.reachable;
|
|
21563
21762
|
if (row.applicability === "unverified" || row.applicability === "affected" && (row.fix_state === null || row.fix_state === "unknown")) {
|
|
21763
|
+
if (row.verify_reason)
|
|
21764
|
+
return { bucket: "verify", rule: 3, route: null, urgent, reason: row.verify_reason };
|
|
21564
21765
|
return urgent || row.fix_state === "fix" ? { bucket: "verify", rule: 3, route: null, urgent } : { bucket: "waiting_vendor", rule: 3, route: null, urgent: false };
|
|
21565
21766
|
}
|
|
21566
21767
|
if (row.applicability === "affected" && row.fix_state === "fix")
|
|
@@ -21731,8 +21932,32 @@ var APPLICABILITY_REASON_TEXT = Object.freeze({
|
|
|
21731
21932
|
wrong_arch: "The affected kernel code is for another processor architecture.",
|
|
21732
21933
|
upstream_fixed_before_series: "The upstream fix is older than this kernel series, but the vendor still lists it.",
|
|
21733
21934
|
owner_not_affected: "The owner recorded that this does not apply here.",
|
|
21734
|
-
owner_false_positive: "The owner recorded this match as a false positive."
|
|
21735
|
-
|
|
21935
|
+
owner_false_positive: "The owner recorded this match as a false positive.",
|
|
21936
|
+
installed_carries_fix: "The installed version is outside every affected range of this advisory.",
|
|
21937
|
+
inconsistent_range: "The installed version is outside every affected range of this advisory; its version range is inconsistent (a fix below its start) and was read as affected below that fix.",
|
|
21938
|
+
version_unparsed: "The installed version or a bound of the advisory's version range could not be compared locally; the advisory database's match stands.",
|
|
21939
|
+
fix_on_newer_line: "The fix is only on a newer release line; whether it affects the installed line is not confirmed. Check the vendor's advisory for the installed line.",
|
|
21940
|
+
client_only: "Only the OpenSSH client is installed (no sshd service): server flaws do not apply unless sshd is installed; client flaws may still apply, so check first."
|
|
21941
|
+
});
|
|
21942
|
+
var LOCAL_REASONS = /* @__PURE__ */ new Set(["installed_carries_fix", "inconsistent_range", "version_unparsed", "fix_on_newer_line"]);
|
|
21943
|
+
function localRangeCheckOf(input2) {
|
|
21944
|
+
const { ecosystem, installed, matches } = input2;
|
|
21945
|
+
const noticeFixes = input2.notice_fixes ?? [];
|
|
21946
|
+
if (distroComparatorOf(ecosystem) === null || matches.length === 0)
|
|
21947
|
+
return null;
|
|
21948
|
+
const notices = noticeFixes.length === 0 || carriesEveryDistroFix(ecosystem, noticeFixes, installed);
|
|
21949
|
+
const said = (match) => match.local_check && LOCAL_REASONS.has(match.local_check.reason) ? match.local_check.value : null;
|
|
21950
|
+
if (notices && matches.every((match) => said(match) === "not_affected")) {
|
|
21951
|
+
return { value: "not_affected", reason: matches.some((match) => match.local_check?.reason === "inconsistent_range") ? "inconsistent_range" : "installed_carries_fix" };
|
|
21952
|
+
}
|
|
21953
|
+
const unverified = matches.some((match) => said(match) === "unverified");
|
|
21954
|
+
const hinted = (match) => said(match) !== null || match.branch === "fix_on_newer_line";
|
|
21955
|
+
if (matches.every(hinted) && matches.some((match) => said(match) !== "not_affected")) {
|
|
21956
|
+
return { value: "unverified", reason: unverified ? "version_unparsed" : "fix_on_newer_line" };
|
|
21957
|
+
}
|
|
21958
|
+
return null;
|
|
21959
|
+
}
|
|
21960
|
+
var CLIENT_ONLY_KEV_TEXT = `This advisory is listed as exploited (CISA KEV): check it first. ${APPLICABILITY_REASON_TEXT.client_only}`;
|
|
21736
21961
|
function runningKernelFacts(facts) {
|
|
21737
21962
|
const kernel = facts?.kernel ?? null;
|
|
21738
21963
|
return kernel !== null && facts.running_kernel !== null && kernel.release === facts.running_kernel ? kernel : null;
|
|
@@ -21777,9 +22002,14 @@ function applicabilityOf(input2) {
|
|
|
21777
22002
|
return vendor("unverified", "vendor_status_unknown");
|
|
21778
22003
|
return vendor("not_affected", "vendor_not_affected");
|
|
21779
22004
|
}
|
|
22005
|
+
const local = input2.local_check ?? null;
|
|
22006
|
+
if (local?.value === "not_affected")
|
|
22007
|
+
return { value: "not_affected", basis: "local_range_check", reason: local.reason, evidence: { vendor_status: status } };
|
|
21780
22008
|
const host = hostRuleResult(input2);
|
|
21781
22009
|
if (host !== null)
|
|
21782
22010
|
return host;
|
|
22011
|
+
if (component.role === "client_only")
|
|
22012
|
+
return { value: "unverified", basis: "host_evidence", reason: "client_only", evidence: { vendor_status: status, facts: { role: "client_only" } } };
|
|
21783
22013
|
if (matches.every((match) => match.undetermined === true))
|
|
21784
22014
|
return { value: "unverified", basis: "range_only", reason: "undetermined", evidence: { vendor_status: status } };
|
|
21785
22015
|
if (deciding !== null && deciding.undetermined !== true && isDistroEcosystem(component.ecosystem)) {
|
|
@@ -21932,9 +22162,9 @@ function riskInputsOf(args) {
|
|
|
21932
22162
|
}
|
|
21933
22163
|
|
|
21934
22164
|
// ../../packages/protocol/dist/security/matching.js
|
|
21935
|
-
var MATCHING_RULES_VERSION = "2026-11-
|
|
22165
|
+
var MATCHING_RULES_VERSION = "2026-11-13.4";
|
|
21936
22166
|
var EVALUATION_RULES_VERSION = [COMPONENT_RULES_VERSION, MATCHING_RULES_VERSION, RISK_RULES_VERSION, BUCKET_RULES_VERSION].join("+");
|
|
21937
|
-
var MATCHING_RULES_VERSION_V2 = "2026-11-
|
|
22167
|
+
var MATCHING_RULES_VERSION_V2 = "2026-11-13.4.v2";
|
|
21938
22168
|
var EVALUATION_RULES_VERSION_V2 = [COMPONENT_RULES_VERSION, MATCHING_RULES_VERSION_V2, RISK_RULES_VERSION_V2, BUCKET_RULES_VERSION_V2].join("+");
|
|
21939
22169
|
var OPEN_CLASSES = ["confirmed", "potential", "unknown"];
|
|
21940
22170
|
var isOpenClass = (value) => OPEN_CLASSES.includes(value);
|
|
@@ -22081,15 +22311,13 @@ function stagedStatusOf(group3, hostHasEsm) {
|
|
|
22081
22311
|
const status = deciding.match.vendor_status;
|
|
22082
22312
|
return status?.status === "fix_staged" && status.source === "ubuntu-tracker" && typeof status.version === "string" && status.version !== "" ? status : null;
|
|
22083
22313
|
}
|
|
22084
|
-
var
|
|
22314
|
+
var dpkgAtOrBelow = (fix, other) => distroAtOrBelow("Debian", fix, other);
|
|
22315
|
+
var carriesEveryFix = (ecosystem, fixed, version3) => carriesEveryDistroFix(ecosystem, fixed, version3);
|
|
22085
22316
|
function stagedTarget(status, component, next, candidate) {
|
|
22086
22317
|
if (status === null || status.version === null)
|
|
22087
22318
|
return null;
|
|
22088
22319
|
const version3 = status.version;
|
|
22089
|
-
const atOrBelow = (other) =>
|
|
22090
|
-
const order2 = typeof other === "string" && epochOf(version3) === epochOf(other) ? compareDpkgVersions(version3, other) : null;
|
|
22091
|
-
return order2 === -1 || order2 === 0;
|
|
22092
|
-
};
|
|
22320
|
+
const atOrBelow = (other) => dpkgAtOrBelow(version3, other);
|
|
22093
22321
|
if (atOrBelow(component.version))
|
|
22094
22322
|
return { version: version3, installed: true, next_kernel: null, candidate_kernel: null };
|
|
22095
22323
|
if (component.role === "running_kernel") {
|
|
@@ -22151,11 +22379,18 @@ function evaluateAsset(input2) {
|
|
|
22151
22379
|
const [ecosystem = "", name3 = ""] = componentKey.split("|");
|
|
22152
22380
|
return packageKey(ecosystem, name3);
|
|
22153
22381
|
};
|
|
22382
|
+
const isImageKernelRow = (row) => {
|
|
22383
|
+
if (row.source !== "image" || !input2.imageKernelNames)
|
|
22384
|
+
return false;
|
|
22385
|
+
const [ecosystem = "", name3 = ""] = row.component_key.split("|");
|
|
22386
|
+
return input2.imageKernelNames.has(`${ecosystem}|${name3}`);
|
|
22387
|
+
};
|
|
22154
22388
|
const isLeftOut = (component) => component.duplicate_of !== void 0 || component.revision_banner === true;
|
|
22155
22389
|
const present = new Set(input2.components.filter((component) => !component.hidden && !isLeftOut(component)).map((component) => component.key));
|
|
22390
|
+
const imageKernelKeys = new Set(previous.filter(isImageKernelRow).map((row) => row.component_key));
|
|
22156
22391
|
const carriedWaiting = /* @__PURE__ */ new Map();
|
|
22157
22392
|
for (const key of Object.keys(input2.previousWaiting ?? {}).sort()) {
|
|
22158
|
-
if (!present.has(key) && !carriedWaiting.has(packageOf2(key)))
|
|
22393
|
+
if (!present.has(key) && !imageKernelKeys.has(key) && !carriedWaiting.has(packageOf2(key)))
|
|
22159
22394
|
carriedWaiting.set(packageOf2(key), key);
|
|
22160
22395
|
}
|
|
22161
22396
|
const previousWaitingOf = (component) => {
|
|
@@ -22260,7 +22495,7 @@ function evaluateAsset(input2) {
|
|
|
22260
22495
|
const kernelTarget = kernelTargetFrom(closes, next, candidate);
|
|
22261
22496
|
const carry = /* @__PURE__ */ new Map();
|
|
22262
22497
|
for (const row of previous) {
|
|
22263
|
-
if (!isOpenClass(row.class) || present.has(row.component_key) || leftOut.has(row.component_key))
|
|
22498
|
+
if (!isOpenClass(row.class) || present.has(row.component_key) || leftOut.has(row.component_key) || isImageKernelRow(row))
|
|
22264
22499
|
continue;
|
|
22265
22500
|
const key = `${row.finding_id}\0${packageOf2(row.component_key)}`;
|
|
22266
22501
|
const held = carry.get(key);
|
|
@@ -22297,7 +22532,11 @@ function evaluateAsset(input2) {
|
|
|
22297
22532
|
let rowClass = cls;
|
|
22298
22533
|
let extra = {};
|
|
22299
22534
|
let staged = null;
|
|
22535
|
+
const local = localRangeCheckOf({ ecosystem: component.ecosystem, installed: component.version, matches: group3.matches, notice_fixes: group3.noticeFixes });
|
|
22536
|
+
const clientOnly = component.role === "client_only";
|
|
22300
22537
|
if (!v2) {
|
|
22538
|
+
if (local?.value === "not_affected")
|
|
22539
|
+
rowClass = "not_affected";
|
|
22301
22540
|
risk = riskScore({
|
|
22302
22541
|
cvss: cvss?.score ?? null,
|
|
22303
22542
|
rating: severity.rating,
|
|
@@ -22308,10 +22547,17 @@ function evaluateAsset(input2) {
|
|
|
22308
22547
|
exposure,
|
|
22309
22548
|
production: context.production,
|
|
22310
22549
|
criticality: context.criticality,
|
|
22311
|
-
class:
|
|
22550
|
+
class: rowClass,
|
|
22312
22551
|
fix_state: fixState
|
|
22313
22552
|
});
|
|
22314
|
-
bucket =
|
|
22553
|
+
bucket = rowClass === "not_affected" ? { bucket: null, rule: 2, route: null } : bucketOf({
|
|
22554
|
+
class: cls,
|
|
22555
|
+
fix_state: fixState,
|
|
22556
|
+
severity: severity.rating,
|
|
22557
|
+
kev,
|
|
22558
|
+
verify_reason: clientOnly ? "client_only" : null
|
|
22559
|
+
});
|
|
22560
|
+
extra = local ? { local_check: local, ...rowClass === "not_affected" ? { closed: "local_range_check" } : {} } : {};
|
|
22315
22561
|
} else {
|
|
22316
22562
|
const inputs = riskInputsOf({
|
|
22317
22563
|
views: group3.views,
|
|
@@ -22324,7 +22570,18 @@ function evaluateAsset(input2) {
|
|
|
22324
22570
|
const vendorCritical = inputs.vendor_rating === "critical" && !inputs.vendor_rating_derived;
|
|
22325
22571
|
const decidingOsv = decidingOsvEntry(group3, fixState);
|
|
22326
22572
|
const previousRule = before?.applicability?.value === "not_affected" && before.applicability.basis === "host_evidence" ? before.applicability.evidence?.rule ?? null : null;
|
|
22327
|
-
const applicability = applicabilityOf({
|
|
22573
|
+
const applicability = applicabilityOf({
|
|
22574
|
+
component,
|
|
22575
|
+
matches: group3.matches,
|
|
22576
|
+
views: group3.views,
|
|
22577
|
+
facts,
|
|
22578
|
+
fix_state: fixState,
|
|
22579
|
+
kev,
|
|
22580
|
+
vendor_critical: vendorCritical,
|
|
22581
|
+
previous_rule: previousRule,
|
|
22582
|
+
local_check: local
|
|
22583
|
+
});
|
|
22584
|
+
const byLocal = applicability.basis === "local_range_check" ? local : null;
|
|
22328
22585
|
const mitigation = applicability.value === "affected" && applicability.reason !== "vendor_status_unknown" ? mitigationOf({ view: decidingOsv?.view ?? null, component, facts }) : null;
|
|
22329
22586
|
const settles = applicability.value === "not_affected";
|
|
22330
22587
|
staged = settles ? null : stagedTarget(stagedStatusOf(group3, hostHasEsm), component, nextKernelVersion, candidateKernelVersion);
|
|
@@ -22344,7 +22601,8 @@ function evaluateAsset(input2) {
|
|
|
22344
22601
|
kev,
|
|
22345
22602
|
vendor_critical: vendorCritical,
|
|
22346
22603
|
reachable: inputs.reachable,
|
|
22347
|
-
mitigation
|
|
22604
|
+
mitigation,
|
|
22605
|
+
verify_reason: applicability.reason === "client_only" ? "client_only" : null
|
|
22348
22606
|
});
|
|
22349
22607
|
bucket = settles || stagedInstalled ? { bucket: null, rule: 2, route: null } : result2;
|
|
22350
22608
|
extra = {
|
|
@@ -22354,7 +22612,9 @@ function evaluateAsset(input2) {
|
|
|
22354
22612
|
risk_inputs: inputs,
|
|
22355
22613
|
urgent: stagedInstalled ? false : result2?.urgent ?? false,
|
|
22356
22614
|
mitigation_id: stagedInstalled ? null : mitigation?.id ?? null,
|
|
22357
|
-
...settles ? { closed: applicability.basis === "host_evidence" ? "host_not_affected" : "vendor_not_affected" } : stagedInstalled ? { closed: "vendor_fix_staged_installed" } : {}
|
|
22615
|
+
...settles ? { closed: applicability.basis === "host_evidence" ? "host_not_affected" : byLocal ? "local_range_check" : "vendor_not_affected" } : stagedInstalled ? { closed: "vendor_fix_staged_installed" } : {},
|
|
22616
|
+
// The unverified check is a note on an open row only.
|
|
22617
|
+
...byLocal ? { local_check: byLocal } : local?.value === "unverified" && !settles && !stagedInstalled ? { local_check: local } : {}
|
|
22358
22618
|
};
|
|
22359
22619
|
}
|
|
22360
22620
|
const settled = rowClass === "not_affected" || rowClass === "fixed";
|
|
@@ -22424,6 +22684,8 @@ function evaluateAsset(input2) {
|
|
|
22424
22684
|
epss_percentile: epssPercentile,
|
|
22425
22685
|
candidate: component.candidate ?? null,
|
|
22426
22686
|
exposure: component.exposure ?? null,
|
|
22687
|
+
...component.image_state ? { image_state: component.image_state, images: component.images ?? [] } : {},
|
|
22688
|
+
...clientOnly ? { client_only: true } : {},
|
|
22427
22689
|
rules: v2 ? MATCHING_RULES_VERSION_V2 : MATCHING_RULES_VERSION,
|
|
22428
22690
|
risk_rules: v2 ? RISK_RULES_VERSION_V2 : RISK_RULES_VERSION,
|
|
22429
22691
|
...extra
|
|
@@ -22483,7 +22745,14 @@ function evaluateAsset(input2) {
|
|
|
22483
22745
|
});
|
|
22484
22746
|
}
|
|
22485
22747
|
const presentPackages = new Set(visible.map((component) => packageKey(component.ecosystem, component.name)));
|
|
22486
|
-
const pendingPackages =
|
|
22748
|
+
const pendingPackages = /* @__PURE__ */ new Map();
|
|
22749
|
+
for (const component of visible) {
|
|
22750
|
+
if (!pendingKeys.has(component.key))
|
|
22751
|
+
continue;
|
|
22752
|
+
const key = packageKey(component.ecosystem, component.name);
|
|
22753
|
+
pendingPackages.set(key, [...pendingPackages.get(key) ?? [], component]);
|
|
22754
|
+
}
|
|
22755
|
+
const lowestPending = (components) => [...components].sort((a, b) => a.key < b.key ? -1 : 1).reduce((low, component) => DPKG_ECOSYSTEM.test(component.ecosystem) && compareDpkgVersions(component.version, low.version) === -1 ? component : low);
|
|
22487
22756
|
const produced = new Set([...rows, ...settledRows].map((row) => `${row.finding_id}\0${row.component_key}`));
|
|
22488
22757
|
const carriedOn = new Set(rows.filter((row) => row.previous_component_key !== null).map((row) => `${row.finding_id}\0${row.previous_component_key}`));
|
|
22489
22758
|
const closed = [];
|
|
@@ -22499,12 +22768,26 @@ function evaluateAsset(input2) {
|
|
|
22499
22768
|
if (incomplete.banner)
|
|
22500
22769
|
continue;
|
|
22501
22770
|
closing = closedRow(row, "not_affected", leftOutReason);
|
|
22771
|
+
} else if (!present.has(row.component_key) && isImageKernelRow(row)) {
|
|
22772
|
+
closing = closedRow(row, "not_affected", "kernel_in_image");
|
|
22502
22773
|
} else if (!present.has(row.component_key)) {
|
|
22503
|
-
const [ecosystem = "", name3 = ""] = row.component_key.split("|");
|
|
22774
|
+
const [ecosystem = "", name3 = "", version3 = ""] = row.component_key.split("|");
|
|
22504
22775
|
if (presentPackages.has(packageKey(ecosystem, name3))) {
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
|
|
22776
|
+
const newVersions = pendingPackages.get(packageKey(ecosystem, name3));
|
|
22777
|
+
if (newVersions) {
|
|
22778
|
+
const fixedNow = !carriedOn.has(`${row.finding_id}\0${row.component_key}`) && newVersions.every((component) => carriesEveryFix(component.ecosystem, row.fixed, component.version));
|
|
22779
|
+
if (!fixedNow) {
|
|
22780
|
+
marked.push({
|
|
22781
|
+
finding_id: row.finding_id,
|
|
22782
|
+
component_key: row.component_key,
|
|
22783
|
+
mark: "carried_from",
|
|
22784
|
+
installed_version: version3,
|
|
22785
|
+
current_version: lowestPending(newVersions).version,
|
|
22786
|
+
reason: "new_version_pending"
|
|
22787
|
+
});
|
|
22788
|
+
continue;
|
|
22789
|
+
}
|
|
22790
|
+
} else if (carriedOn.has(`${row.finding_id}\0${row.component_key}`)) {
|
|
22508
22791
|
closed.push({ finding_id: row.finding_id, component_key: row.component_key, class: "fixed", reason: "superseded", score: 0, band: "none" });
|
|
22509
22792
|
continue;
|
|
22510
22793
|
}
|
|
@@ -24078,6 +24361,23 @@ var SECTION_COLLECTORS = Object.freeze({
|
|
|
24078
24361
|
docker: "host-docker"
|
|
24079
24362
|
});
|
|
24080
24363
|
|
|
24364
|
+
// ../../packages/protocol/dist/security/posture-independent.js
|
|
24365
|
+
var INDEPENDENT_LIMITS = Object.freeze({
|
|
24366
|
+
/** The most all failed hardening checks together deduct. */
|
|
24367
|
+
advanced_cap: 40,
|
|
24368
|
+
/** Per exploited (KEV) vulnerability waiting for a vendor fix. */
|
|
24369
|
+
exploited_without_fix_points: 10,
|
|
24370
|
+
/** The most the exploited vulnerabilities without a vendor fix together deduct. */
|
|
24371
|
+
exploited_without_fix_cap: 20
|
|
24372
|
+
});
|
|
24373
|
+
var INDEPENDENT_REASON_TEXT = Object.freeze({
|
|
24374
|
+
official_not_rated: "The official score is not rated yet, so there is nothing to start from.",
|
|
24375
|
+
official_provisional: "The official score is provisional.",
|
|
24376
|
+
hardening_unknown: "The advanced security checks have not run on this asset; they deduct nothing until they do.",
|
|
24377
|
+
checks_not_read: "Some advanced security checks could not be read; they deduct nothing until they are.",
|
|
24378
|
+
vendor_unknown: "The vulnerabilities waiting for a vendor fix are not known yet; they deduct nothing until they are."
|
|
24379
|
+
});
|
|
24380
|
+
|
|
24081
24381
|
// ../../packages/protocol/dist/http.js
|
|
24082
24382
|
var HTTP_API_VERSION = 1;
|
|
24083
24383
|
var requestIdSchema = external_exports.uuid();
|
|
@@ -24216,7 +24516,7 @@ var import_node_fs = require("node:fs");
|
|
|
24216
24516
|
var import_node_path = require("node:path");
|
|
24217
24517
|
var import_node_sea = require("node:sea");
|
|
24218
24518
|
var import_node_url = require("node:url");
|
|
24219
|
-
var SOURCE_VERSION = "0.8.
|
|
24519
|
+
var SOURCE_VERSION = "0.8.1";
|
|
24220
24520
|
var BUILD_INFO = typeof define_CONBRIDGE_BUILD_default === "object" && define_CONBRIDGE_BUILD_default !== null ? define_CONBRIDGE_BUILD_default : null;
|
|
24221
24521
|
var AGENT_VERSION = BUILD_INFO?.version ?? SOURCE_VERSION;
|
|
24222
24522
|
function runningAsSea() {
|
|
@@ -34362,6 +34662,10 @@ function windowsEnabled(value) {
|
|
|
34362
34662
|
return WINDOWS_START_TYPES[value.trim().toLowerCase()] ?? null;
|
|
34363
34663
|
return null;
|
|
34364
34664
|
}
|
|
34665
|
+
function readWindowsServices(output2) {
|
|
34666
|
+
const services = parseWindowsServices(output2);
|
|
34667
|
+
return services.length > 0 ? services : null;
|
|
34668
|
+
}
|
|
34365
34669
|
function parseWindowsServices(json2) {
|
|
34366
34670
|
const parsed = parseJson4(json2);
|
|
34367
34671
|
if (parsed === void 0 || parsed === null)
|
|
@@ -35870,9 +36174,14 @@ async function collectServices(c) {
|
|
|
35870
36174
|
} else if (platform2 === "win32") {
|
|
35871
36175
|
const win = await c.command("windows-services", "powershell.exe", [...POWERSHELL, PS_SERVICES], LIST);
|
|
35872
36176
|
if (win !== null) {
|
|
35873
|
-
const items =
|
|
35874
|
-
|
|
35875
|
-
|
|
36177
|
+
const items = readWindowsServices(win);
|
|
36178
|
+
if (items === null) {
|
|
36179
|
+
const entry = c.coverage.find((e) => e.collector === "windows-services");
|
|
36180
|
+
c.cover("windows-services", "failed", 0, entry?.duration_ms ?? 0);
|
|
36181
|
+
} else {
|
|
36182
|
+
c.services.push(...items);
|
|
36183
|
+
c.counted("windows-services", items.length, INVENTORY_LIMITS.services);
|
|
36184
|
+
}
|
|
35876
36185
|
}
|
|
35877
36186
|
}
|
|
35878
36187
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conbridge-agent",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "ConBridge Desktop Agent: connect this computer to ConBridge so approved AI apps can use the folders you share.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://conbridge.app",
|