@atlasnomos/atlas 1.1.1 → 1.1.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/atlas.js +2 -4
- package/package.json +1 -2
- package/src/kernel/boot/BootGuard.js +9 -5
package/atlas.js
CHANGED
|
@@ -8,10 +8,8 @@ const path = require('path');
|
|
|
8
8
|
const { ErrorHandler } = require('./src/core/ErrorHandler');
|
|
9
9
|
|
|
10
10
|
// 0. Entry Point Hardening (Anti-Bypass)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
process.exit(1);
|
|
14
|
-
}
|
|
11
|
+
const { validateEntryPoint } = require('./src/kernel/boot/BootGuard');
|
|
12
|
+
validateEntryPoint();
|
|
15
13
|
|
|
16
14
|
// 1. Load Env & Config
|
|
17
15
|
// Priority 1: CWD .env (Project specific)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlasnomos/atlas",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Production-grade AI governance kernel for autonomous agents with fail-closed security and cryptographic audit trails",
|
|
5
5
|
"main": "atlas.js",
|
|
6
6
|
"bin": {
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
"figlet": "1.9.4",
|
|
72
72
|
"lodash-es": "4.17.21",
|
|
73
73
|
"lru-cache": "8.0.5",
|
|
74
|
-
"lz4": "0.6.5",
|
|
75
74
|
"mcp": "1.4.2",
|
|
76
75
|
"msgpack-lite": "0.1.26",
|
|
77
76
|
"node-fetch": "2.7.0",
|
|
@@ -25,7 +25,8 @@ const { panic } = require('./HardKill');
|
|
|
25
25
|
* All paths are relative to the atlas root directory.
|
|
26
26
|
*/
|
|
27
27
|
const AUTHORIZED_ENTRY_POINTS = Object.freeze([
|
|
28
|
-
'atlas.js'
|
|
28
|
+
'atlas.js',
|
|
29
|
+
'atlas' // Supported for NPM global wrapper
|
|
29
30
|
]);
|
|
30
31
|
|
|
31
32
|
// ═══════════════════════════════════════════════════════════════
|
|
@@ -56,11 +57,14 @@ function validateEntryPoint() {
|
|
|
56
57
|
const expectedPath = path.join(atlasRoot, entryFilename);
|
|
57
58
|
|
|
58
59
|
// Normalize paths for comparison (handle Windows backslashes)
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
const normalizedActual = path.resolve(mainModule.filename);
|
|
61
|
+
const isUnderRoot = normalizedActual.startsWith(atlasRoot);
|
|
62
|
+
|
|
63
|
+
if (!isUnderRoot) {
|
|
64
|
+
panic('BOOT_GUARD: Entry point out of bounds', {
|
|
61
65
|
actual: mainModule.filename,
|
|
62
|
-
|
|
63
|
-
reason: 'Entry point must be
|
|
66
|
+
expectedPrefix: atlasRoot,
|
|
67
|
+
reason: 'Entry point must be within the kernel root directory'
|
|
64
68
|
});
|
|
65
69
|
return false;
|
|
66
70
|
}
|