nexus-agents 4.22.0 → 4.22.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/dist/cli.js CHANGED
@@ -153,7 +153,7 @@ import {
153
153
  validateNexusEnv,
154
154
  validateWorkflow,
155
155
  wrapInMarkdownFence
156
- } from "./chunk-RNMJUIPI.js";
156
+ } from "./chunk-UTJRTD7H.js";
157
157
  import "./chunk-VZHZFAYL.js";
158
158
  import "./chunk-HFOQKCD2.js";
159
159
  import "./chunk-RSMG2DPB.js";
@@ -173,7 +173,7 @@ import {
173
173
  doctorCommand,
174
174
  initDataDirectories,
175
175
  runDoctor
176
- } from "./chunk-IIJSUNEK.js";
176
+ } from "./chunk-CMXVOO4L.js";
177
177
  import {
178
178
  buildOpenAICompatAdapters,
179
179
  readOpenAICompatEnv
@@ -21808,17 +21808,23 @@ function getAuthValues(config) {
21808
21808
  const method = configAuth?.method ?? process.env["NEXUS_AUTH_METHOD"] ?? "none";
21809
21809
  return { enabled, method };
21810
21810
  }
21811
+ function warnIfAuditDisabled(auditEnabled, logger22) {
21812
+ if (auditEnabled) return;
21813
+ logger22.warn(
21814
+ "Audit logging is disabled \u2014 no tamper-evident event chain is being written. Set security.audit.enabled: true to enable it."
21815
+ );
21816
+ }
21811
21817
  function logSecurityConfig(logger22, config) {
21812
21818
  const policyFirewall = createConfiguredPolicyFirewall(logger22, config);
21813
21819
  const authVals = getAuthValues(config);
21814
21820
  const policyVals = getPolicyValues(config);
21815
21821
  const rateLimitVals = getRateLimitValues(config);
21822
+ const auditEnabled = config?.security?.audit?.enabled === true;
21816
21823
  logger22.info("Security configuration", {
21817
21824
  // #4888: named `configuredPolicyMode`, not `policyMode`. This runs at
21818
- // startup, before `stagePolicyFirewallForRollout` decides the mode that
21819
- // will actually apply — which is `warn` unless the operator opted in. A
21820
- // field called `policyMode` reading `enforce` here would claim an
21821
- // enforcement the staged rollout does not perform.
21825
+ // startup, before `stagePolicyFirewallForRollout` forces the firewall to
21826
+ // `warn` — the mode that actually applies. A field called `policyMode`
21827
+ // reading `enforce` here would claim an enforcement that does not happen.
21822
21828
  configuredPolicyMode: policyVals.mode,
21823
21829
  defaultExecutionMode: policyVals.defaultExec,
21824
21830
  policyRuleCount: policyFirewall.getRules().length,
@@ -21826,8 +21832,15 @@ function logSecurityConfig(logger22, config) {
21826
21832
  authMethod: authVals.method,
21827
21833
  rateLimitEnabled: rateLimitVals.enabled,
21828
21834
  rateLimitRequestsPerMinute: rateLimitVals.rpm,
21835
+ // #4990: audit was the only security control missing from this line, and
21836
+ // `initializeAuditLogger` announces its absence at `debug` — dropped at the
21837
+ // default level. So the tamper-evident chain the docs lead with could be
21838
+ // off while the startup log confirmed four other controls and said nothing
21839
+ // about this one, which reads as fine rather than absent.
21840
+ auditEnabled,
21829
21841
  allowedPaths: config?.security?.allowedPaths ?? ["./"]
21830
21842
  });
21843
+ warnIfAuditDisabled(auditEnabled, logger22);
21831
21844
  if (!authVals.enabled) {
21832
21845
  logger22.warn(
21833
21846
  "Authentication explicitly disabled \u2014 network-exposed endpoints are unprotected. Remove NEXUS_AUTH_ENABLED=false to re-enable."