Repository navigation
114 lines (102 loc) · 3.21 KB
/
Copy pathjs-obfuscation-test.yml
File metadata and controls
114 lines (102 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: "Obfuscate js test application"
on:
push:
jobs:
test-js-obfuscation:
runs-on: ubuntu-latest
steps:
- name: Set current branch ref
id: git_info
run: |
echo "branch=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
echo "hash=$(git rev-parse --short \"$GITHUB_SHA\")" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
ref: ${{ steps.git_info.outputs.branch }}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Execute without obfuscation
run: |
npm --prefix example install
node example/index.js
- name: Create distribution path
run: |
mkdir -p dist_low_obfuscation
- name: Low obfuscation test
uses: ./
with:
input_path: example
output_path: dist_low_obfuscation
compact: true
control_flow_flattening: false
dead_code_injection: false
debug_protection: false
debug_protection_interval: 0
log: false
disable_console_output: true
rename_globals: false
string_array_rotate: true
self_defending: true
string_array: true
string_array_encoding: 'none'
string_array_threshold: 0.75
unicode_escape_sequence: false
target: node
- name: Create distribution path
run: |
mkdir -p dist_medium_obfuscation
- name: Medium obfuscation test
uses: ./
with:
input_path: example
output_path: dist_medium_obfuscation
compact: true
control_flow_flattening: true
control_flow_flattening_threshold: 0.75
dead_code_injection: true
dead_code_injection_threshold: 0.4
debug_protection: false
debug_protection_interval: 0
log: false
disable_console_output: true
rename_globals: false
string_array_rotate: true
self_defending: true
string_array: true
string_array_encoding: 'base64'
string_array_threshold: 0.75
unicode_escape_sequence: false
target: node
- name: Create distribution path
run: |
mkdir -p dist_high_obfuscation
- name: High obfuscation test
uses: ./
with:
input_path: example
output_path: dist_high_obfuscation
compact: true
control_flow_flattening: true
control_flow_flattening_threshold: 1
dead_code_injection: true
dead_code_injection_threshold: 1
debug_protection: true
debug_protection_interval: 500
disable_console_output: true
rename_globals: false
string_array_rotate: true
self_defending: true
string_array: true
string_array_encoding: 'rc4'
string_array_threshold: 1
unicode_escape_sequence: false
target: node
- name: upload files
uses: actions/upload-artifact@v4
with:
name: obufscated_example_files
path: |
dist_low_obfuscation/
dist_medium_obfuscation/
dist_high_obfuscation/