mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
fix(security): remove default credentials from example config
Removes the hardcoded `auth: "admin:password"` from `torch-config.example.json` to prevent users from accidentally deploying with insecure defaults. Adds a regression test `test/verify-example-config-security.test.mjs` to ensure the example config does not contain default credentials in the future. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
8d43fc1be8
commit
3648b0da40
2 files changed
+15
-2
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
test('torch-config.example.json Security', (t) => {
|
||||
const configPath = path.resolve('torch-config.example.json');
|
||||
const content = fs.readFileSync(configPath, 'utf8');
|
||||
const config = JSON.parse(content);
|
||||
|
||||
if (config.dashboard) {
|
||||
assert.strictEqual(config.dashboard.auth, undefined, 'Example config should not contain auth field');
|
||||
}
|
||||
});
|
||||
@@ -18,8 +18,7 @@
|
||||
},
|
||||
"dashboard": {
|
||||
"defaultCadenceView": "daily",
|
||||
"defaultStatusView": "active",
|
||||
"auth": "admin:password"
|
||||
"defaultStatusView": "active"
|
||||
},
|
||||
"scheduler": {
|
||||
"firstPromptByCadence": {
|
||||
|
||||
Reference in new issue
Block a user