Skip to content

Commit 1cbd0f0

Browse files
authored
Merge pull request #69 from cloudera/CYB-201
2 parents 97aaef0 + 3a451e1 commit 1cbd0f0

File tree

146 files changed

+13719
-8174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+13719
-8174
lines changed

.github/workflows/build_and_test.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,26 @@ jobs:
2828
restore-keys: |
2929
${{ runner.os }}-maven-
3030
- name: Build and Test with Maven
31-
run: mvn -B package --file flink-cyber/pom.xml
31+
run: mvn -P '!add-depebdencies-for-IDEA,!full-build,!include-front-end' -B package --file flink-cyber/pom.xml
32+
3233
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
3334
- name: Update dependency graph
34-
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
35+
uses: advanced-security/maven-dependency-submission-action@v3
3536
with:
3637
directory: /home/runner/work/cybersec/cybersec/flink-cyber
38+
build_and_test_angular:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Use Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: '20.x'
46+
- name: Install Angular CLI
47+
run: npm install -g @angular/cli
48+
- name: Install dependencies
49+
run: npm install
50+
working-directory: ./flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client
51+
- name: Run test
52+
run: npm run test:headless
53+
working-directory: ./flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client

flink-cyber/flink-commands/json-commands/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
<version>${log4j.version}</version>
7070
<scope>provided</scope>
7171
</dependency>
72-
7372
</dependencies>
7473

7574
<build>

flink-cyber/flink-commands/scoring-commands/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
<artifactId>scoring-commands</artifactId>
2525

2626
<dependencies>
27+
<dependency>
28+
<groupId>org.apache.flink</groupId>
29+
<artifactId>flink-java</artifactId>
30+
<version>${flink.version}</version>
31+
</dependency>
2732
<dependency>
2833
<groupId>org.projectlombok</groupId>
2934
<artifactId>lombok</artifactId>

flink-cyber/flink-cyber-api/src/main/java/com/cloudera/cyber/indexing/MappingColumnDto.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import lombok.AllArgsConstructor;
55
import lombok.Data;
66
import lombok.NoArgsConstructor;
7-
import org.springframework.util.StringUtils;
7+
import org.apache.commons.lang3.StringUtils;
88

99
@Data
1010
@NoArgsConstructor
@@ -43,12 +43,15 @@ public String getRawKafkaName(){
4343
}
4444

4545
public String getPath() {
46-
return StringUtils.hasText(path)
47-
? (path.equals(".") ? "" : path)
48-
: "extensions";
46+
if (StringUtils.isEmpty(path)) {
47+
return "extensions";
48+
} else if (path.equals(".")) {
49+
return "";
50+
}
51+
return path;
4952
}
5053

51-
public Boolean getIsMap() {
54+
public boolean getIsMap() {
5255
return isMap == null ? path == null : isMap;
5356
}
5457
}

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/.eslintrc.json

Lines changed: 145 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,44 @@
33
"ignorePatterns": [
44
"projects/**/*"
55
],
6+
"rules": {
7+
"valid-jsdoc" : "off"
8+
},
69
"overrides": [
10+
{
11+
12+
"files": ["*.actions.ts"],
13+
"parserOptions": {
14+
"project": [
15+
"tsconfig.json",
16+
"e2e/tsconfig.json"
17+
],
18+
"createDefaultProgram": true
19+
},
20+
"extends": [
21+
"plugin:@angular-eslint/ng-cli-compat",
22+
"plugin:@angular-eslint/recommended",
23+
"plugin:@angular-eslint/template/process-inline-templates"
24+
],
25+
"rules": {
26+
"@typescript-eslint/naming-convention": [
27+
"error",
28+
{
29+
"selector": "class",
30+
"format": ["PascalCase"],
31+
"custom": {
32+
"regex": "Action$",
33+
"match": true
34+
}
35+
}
36+
]
37+
}
38+
},
739
{
840
"files": [
941
"*.ts"
1042
],
43+
"excludedFiles": ["*.actions.ts", "*.spec.ts"],
1144
"parserOptions": {
1245
"project": [
1346
"tsconfig.json",
@@ -16,10 +49,74 @@
1649
"createDefaultProgram": true
1750
},
1851
"extends": [
52+
"plugin:@angular-eslint/ng-cli-compat",
1953
"plugin:@angular-eslint/recommended",
2054
"plugin:@angular-eslint/template/process-inline-templates"
2155
],
2256
"rules": {
57+
"no-unused-vars": "off",
58+
"jsdoc/check-alignment": "off",
59+
"jsdoc/check-param-names": "off",
60+
"@typescript-eslint/adjacent-overload-signatures": "off",
61+
"jsdoc/newline-after-description": "off",
62+
"eslint-plugin/require-meta-fixable": "off",
63+
"prefer-arrow/prefer-arrow-functions": "off",
64+
"@typescript-eslint/no-non-null-assertion": "off",
65+
"@typescript-eslint/prefer-enum-initializers": "off",
66+
"indent": "off",
67+
"simple-import-sort/imports": "off",
68+
"array-bracket-spacing": "off",
69+
"no-underscore-dangle": "off",
70+
"@typescript-eslint/no-unused-vars": [
71+
"warn",
72+
{
73+
"vars": "all",
74+
"varsIgnorePattern": "^_",
75+
"args": "after-used",
76+
"argsIgnorePattern": "^_"
77+
}
78+
],
79+
"@typescript-eslint/naming-convention": [
80+
"error",
81+
{
82+
"selector": "objectLiteralProperty",
83+
"format": null
84+
},
85+
{
86+
"selector": "enumMember",
87+
"format": ["UPPER_CASE"]
88+
},
89+
{
90+
"selector": "classProperty",
91+
"modifiers": ["static"],
92+
"format": ["UPPER_CASE"]
93+
},
94+
{
95+
"selector": "variable",
96+
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
97+
"leadingUnderscore": "allow",
98+
"trailingUnderscore": "allow"
99+
},
100+
{
101+
"selector": "function",
102+
"format": ["camelCase", "PascalCase"]
103+
},
104+
{
105+
"selector": "typeLike",
106+
"format": ["PascalCase"]
107+
},
108+
{
109+
"selector": "memberLike",
110+
"format": ["camelCase"],
111+
"leadingUnderscore": "forbid"
112+
},
113+
{
114+
"selector": "memberLike",
115+
"modifiers": ["private"],
116+
"format": ["camelCase"],
117+
"leadingUnderscore": "require"
118+
}
119+
],
23120
"@angular-eslint/component-selector": [
24121
"error",
25122
{
@@ -36,7 +133,7 @@
36133
"type": "attribute"
37134
}
38135
],
39-
"@angular-eslint/no-empty-lifecycle-method": "off"
136+
"@angular-eslint/no-empty-lifecycle-method": "error"
40137
}
41138
},
42139
{
@@ -46,7 +143,53 @@
46143
"extends": [
47144
"plugin:@angular-eslint/template/recommended"
48145
],
49-
"rules": {}
146+
"rules": {
147+
"@angular-eslint/template/no-negated-async": "warn",
148+
"@angular-eslint/template/eqeqeq": "off"
149+
}
150+
},
151+
{
152+
"files": [
153+
"*.spec.ts"
154+
],
155+
"parserOptions": {
156+
"project": [
157+
"tsconfig.json",
158+
"e2e/tsconfig.json"
159+
],
160+
"createDefaultProgram": true
161+
},
162+
"plugins": [
163+
"jasmine"
164+
],
165+
"extends": [
166+
"plugin:jasmine/recommended",
167+
"plugin:@typescript-eslint/recommended"
168+
],
169+
"rules": {
170+
"simple-import-sort/imports": "off",
171+
"jasmine/new-line-before-expect": "off",
172+
"@typescript-eslint/naming-convention": "off",
173+
"jasmine/no-unsafe-spy": "off",
174+
"no-restricted-globals": [
175+
"error",
176+
"event"
177+
],
178+
"@typescript-eslint/no-shadow": "warn",
179+
"no-underscore-dangle": "off",
180+
"no-useless-escape": "off",
181+
"@angular-eslint/prefer-on-push-component-change-detection": "off",
182+
"jasmine/prefer-toHaveBeenCalledWith": "off",
183+
"jasmine/no-spec-dupes": [
184+
"error",
185+
"branch"
186+
],
187+
"jasmine/no-suite-dupes": [
188+
"error",
189+
"branch"
190+
],
191+
"jasmine/no-global-setup": "off"
192+
}
50193
}
51194
]
52195
}

flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client/angular.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
{
180180
"glob": "**/*",
181181
"input": "node_modules/ngx-monaco-editor-v2",
182-
"output": "/assets/monaco-editor/"
182+
"output": "/assets/monaco-editor/min"
183183
}
184184
]
185185
}
@@ -239,5 +239,6 @@
239239
}
240240
}
241241
}
242-
}
242+
},
243+
"defaultProject": "parser-chaining"
243244
}

0 commit comments

Comments
 (0)