x-fidelity 5.2.1 → 5.2.2
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/package.json +1 -1
- package/dist/demoConfig/java-microservice-exemptions/team3-java-microservice-exemptions.json +0 -15
- package/dist/demoConfig/java-microservice-exemptions.json +0 -14
- package/dist/demoConfig/java-microservice.json +0 -34
- package/dist/demoConfig/node-fullstack-exemptions/project1-node-fullstack-exemptions.json +0 -15
- package/dist/demoConfig/node-fullstack-exemptions/team1-node-fullstack-exemptions.json +0 -9
- package/dist/demoConfig/node-fullstack-exemptions.json +0 -14
- package/dist/demoConfig/node-fullstack.json +0 -78
- package/dist/demoConfig/rules/custom-rule.json +0 -27
- package/dist/demoConfig/rules/customFactExample-iterative-rule.json +0 -30
- package/dist/demoConfig/rules/factDoesNotAddResultToAlmanac-iterative-rule.json +0 -33
- package/dist/demoConfig/rules/functionComplexity-iterative-rule.json +0 -37
- package/dist/demoConfig/rules/functionCount-iterative-rule.json +0 -30
- package/dist/demoConfig/rules/invalidSystemIdConfigured-iterative-rule.json +0 -43
- package/dist/demoConfig/rules/lowMigrationToNewComponentLib-global-rule.json +0 -42
- package/dist/demoConfig/rules/missingRequiredFiles-global-rule.json +0 -35
- package/dist/demoConfig/rules/newSdkFeatureNotAdoped-global-rule.json +0 -38
- package/dist/demoConfig/rules/noDatabases-iterative-rule.json +0 -35
- package/dist/demoConfig/rules/nonStandardDirectoryStructure-global-rule.json +0 -30
- package/dist/demoConfig/rules/openaiAnalysisA11y-global-rule.json +0 -31
- package/dist/demoConfig/rules/openaiAnalysisTestCriticality-global-rule.json +0 -31
- package/dist/demoConfig/rules/openaiAnalysisTop5-global-rule.json +0 -31
- package/dist/demoConfig/rules/outdatedFramework-global-rule.json +0 -35
- package/dist/demoConfig/rules/reactHooksDependency-iterative-rule.json +0 -36
- package/dist/demoConfig/rules/reactHooksMigration-global-rule.json +0 -56
- package/dist/demoConfig/rules/sensitiveLogging-iterative-rule.json +0 -37
- package/dist/index.js +0 -128099
- package/dist/index.js.map +0 -6
- package/dist/xfidelity +0 -128099
package/package.json
CHANGED
package/dist/demoConfig/java-microservice-exemptions/team3-java-microservice-exemptions.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"repoUrl": "git@github.com:zotoio/x-fidelity.git",
|
|
4
|
-
"rule": "outdatedFramework-global",
|
|
5
|
-
"expirationDate": "2023-12-31",
|
|
6
|
-
"reason": "Upgrading dependencies is scheduled for Q4 2024"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"repoUrl": "git@github.com:zotoio/x-fidelity.git",
|
|
10
|
-
"rule": "sensitiveLogging-iterative",
|
|
11
|
-
"expirationDate": "2023-09-30",
|
|
12
|
-
"reason": "Security audit and logging refactor planned for Q3 2024"
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"repoUrl": "https://github.com/example/java-microservice-project",
|
|
4
|
-
"rule": "nonStandardDirectoryStructure-global",
|
|
5
|
-
"expirationDate": "2024-10-31",
|
|
6
|
-
"reason": "Project restructuring planned for Q4 2024"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"repoUrl": "git@github.com:zotoio/x-fidelity.git",
|
|
10
|
-
"rule": "noDatabases-iterative",
|
|
11
|
-
"expirationDate": "2024-11-30",
|
|
12
|
-
"reason": "Database abstraction layer implementation scheduled for November 2024"
|
|
13
|
-
}
|
|
14
|
-
]
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "java-microservice",
|
|
3
|
-
"rules": [
|
|
4
|
-
"sensitiveLogging-iterative",
|
|
5
|
-
"nonStandardDirectoryStructure-global"
|
|
6
|
-
],
|
|
7
|
-
"config": {
|
|
8
|
-
"minimumDependencyVersions": {
|
|
9
|
-
"springbootstarter": ">2.5.0",
|
|
10
|
-
"spring-boot-starter-web": "^2.5.0"
|
|
11
|
-
},
|
|
12
|
-
"standardStructure": {
|
|
13
|
-
"src": {
|
|
14
|
-
"main": {
|
|
15
|
-
"java": null,
|
|
16
|
-
"resources": null
|
|
17
|
-
},
|
|
18
|
-
"test": {
|
|
19
|
-
"java": null,
|
|
20
|
-
"resources": null
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"blacklistPatterns": [
|
|
25
|
-
".*\\/\\..*",
|
|
26
|
-
".*\\.(log|lock)$",
|
|
27
|
-
".*\\/(target|build|out|dist|coverage|build|node_modules)(\\/.*|$)"
|
|
28
|
-
],
|
|
29
|
-
"whitelistPatterns": [
|
|
30
|
-
".*\\.(java|xml|properties|yml)$",
|
|
31
|
-
".*\\/pom\\.xml$"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"repoUrl": "git@github.com:zotoio/x-fidelity.git",
|
|
4
|
-
"rule": "noDatabases-iterative",
|
|
5
|
-
"expirationDate": "2026-01-04",
|
|
6
|
-
"reason": "Upgrading dependencies is scheduled for Q4 2024"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"repoUrl": "git@github.com:zotoio/x-fidelity.git",
|
|
10
|
-
"rule": "sensitiveLogging-iterative",
|
|
11
|
-
"expirationDate": "2023-09-30",
|
|
12
|
-
"reason": "Security audit and logging refactor planned for Q3 2024"
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"repoUrl": "git@github.com:zotoio/x-fidelity.git",
|
|
4
|
-
"rule": "outdatedFramework-global",
|
|
5
|
-
"expirationDate": "2023-12-31",
|
|
6
|
-
"reason": "Upgrading dependencies is scheduled for Q4 2024"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"repoUrl": "git@github.com:zotoio/x-fidelity.git",
|
|
10
|
-
"rule": "sensitiveLogging-iterative",
|
|
11
|
-
"expirationDate": "2023-09-30",
|
|
12
|
-
"reason": "Security audit and logging refactor planned for Q3 2024"
|
|
13
|
-
}
|
|
14
|
-
]
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "node-fullstack",
|
|
3
|
-
"rules": [
|
|
4
|
-
"sensitiveLogging-iterative",
|
|
5
|
-
"outdatedFramework-global",
|
|
6
|
-
"noDatabases-iterative",
|
|
7
|
-
"nonStandardDirectoryStructure-global",
|
|
8
|
-
"openaiAnalysisTop5-global",
|
|
9
|
-
"openaiAnalysisA11y-global",
|
|
10
|
-
"openaiAnalysisTestCriticality-global",
|
|
11
|
-
"invalidSystemIdConfigured-iterative",
|
|
12
|
-
"missingRequiredFiles-global",
|
|
13
|
-
"factDoesNotAddResultToAlmanac-iterative",
|
|
14
|
-
"newSdkFeatureNotAdoped-global",
|
|
15
|
-
"lowMigrationToNewComponentLib-global",
|
|
16
|
-
"functionComplexity-iterative",
|
|
17
|
-
"functionCount-iterative",
|
|
18
|
-
"reactHooksDependency-iterative",
|
|
19
|
-
"reactHooksMigration-global",
|
|
20
|
-
"customFactExample-iterative"
|
|
21
|
-
],
|
|
22
|
-
"config": {
|
|
23
|
-
"minimumDependencyVersions": {
|
|
24
|
-
"@types/react": ">=18.0.0",
|
|
25
|
-
"react": "18.2.0",
|
|
26
|
-
"typescript": "5.0.0",
|
|
27
|
-
"next": "13.0.0",
|
|
28
|
-
"node": "18.0.0",
|
|
29
|
-
"@yarnpkg/lockfile": "<1.2.0",
|
|
30
|
-
"commander": ">=2.0.0 <13.0.0",
|
|
31
|
-
"nodemon": ">4.9.0",
|
|
32
|
-
"@colors/colors": "1.7.0 || 1.6.0"
|
|
33
|
-
},
|
|
34
|
-
"standardStructure": {
|
|
35
|
-
"src": {
|
|
36
|
-
"components": null,
|
|
37
|
-
"utils": null,
|
|
38
|
-
"config": null,
|
|
39
|
-
"facts": null
|
|
40
|
-
},
|
|
41
|
-
"package.json": null,
|
|
42
|
-
"README.md": null
|
|
43
|
-
},
|
|
44
|
-
"blacklistPatterns": [
|
|
45
|
-
".*\\/\\..*",
|
|
46
|
-
".*\\.(log|lock|txt)$",
|
|
47
|
-
".*\\/(dist|coverage|build|node_modules|tmp|temp|out|xfiResults|x-fidelity-vscode\\/cli)(\\/.*|$)"
|
|
48
|
-
],
|
|
49
|
-
"whitelistPatterns": [
|
|
50
|
-
".*\\.(ts|tsx|js|jsx|json)$",
|
|
51
|
-
".*xfiTestMatch\\.json$",
|
|
52
|
-
".*customExample\\.json$",
|
|
53
|
-
".*\\/README\\.md$"
|
|
54
|
-
],
|
|
55
|
-
"requiredFiles": [
|
|
56
|
-
"README.md",
|
|
57
|
-
"package.json",
|
|
58
|
-
"src/index.js"
|
|
59
|
-
],
|
|
60
|
-
"sensitiveFileFalsePositives": [
|
|
61
|
-
"src/components/SensitiveLogging.tsx"
|
|
62
|
-
],
|
|
63
|
-
"notifications": {
|
|
64
|
-
"enabled": true,
|
|
65
|
-
"providers": ["email"],
|
|
66
|
-
"recipients": {
|
|
67
|
-
"email": ["io@zoto.io"]
|
|
68
|
-
},
|
|
69
|
-
"codeOwners": true,
|
|
70
|
-
"notifyOnSuccess": true,
|
|
71
|
-
"notifyOnFailure": true,
|
|
72
|
-
"customTemplates": {
|
|
73
|
-
"success": "All checks passed successfully! 🎉\n\nArchetype: ${archetype}\nFiles analyzed: ${fileCount}\nExecution time: ${executionTime}s\n\nPlugin coverage:\n- AST Analysis: ✅\n- Pattern Matching: ✅\n- React Patterns: ✅\n- Sensitive Logging: ✅\n- Database Checks: ✅\n- OpenAI Analysis: ✅\n- Required Files: ✅\n- Custom Examples: ✅",
|
|
74
|
-
"failure": "Issues found in codebase:\n\nArchetype: ${archetype}\nTotal issues: ${totalIssues}\n- Warnings: ${warningCount}\n- Errors: ${errorCount}\n- Fatalities: ${fatalityCount}\n\nAffected files:\n${affectedFiles}\n\nPlugin analysis results:\n- Function complexity issues detected\n- Sensitive logging patterns found\n- React hooks dependency issues\n- Code rhythm concerns identified"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "custom-rule",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "equal",
|
|
9
|
-
"value": "REPO_GLOBAL_CHECK"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "customFact",
|
|
13
|
-
"operator": "customOperator",
|
|
14
|
-
"value": "custom fact data"
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
"event": {
|
|
19
|
-
"type": "warning",
|
|
20
|
-
"params": {
|
|
21
|
-
"message": "Custom rule detected matching data",
|
|
22
|
-
"details": {
|
|
23
|
-
"fact": "customFact"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "customFactExample-iterative",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "equal",
|
|
9
|
-
"value": "customExample.json"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "customFact",
|
|
13
|
-
"params": {
|
|
14
|
-
"resultFact": "customFactResult"
|
|
15
|
-
},
|
|
16
|
-
"operator": "customOperator",
|
|
17
|
-
"value": "custom fact data"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
"event": {
|
|
22
|
-
"type": "warning",
|
|
23
|
-
"params": {
|
|
24
|
-
"message": "Custom fact example rule triggered - demonstrates plugin extensibility",
|
|
25
|
-
"details": {
|
|
26
|
-
"fact": "customFactResult"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "factDoesNotAddResultToAlmanac-iterative",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.filePath",
|
|
8
|
-
"operator": "regexMatch",
|
|
9
|
-
"value": "^.*\\/facts\\/(?!.*\\.test).*\\.ts$"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"not": {
|
|
13
|
-
"fact": "repoFileAnalysis",
|
|
14
|
-
"params": {
|
|
15
|
-
"checkPattern": [
|
|
16
|
-
"almanac\\.addRuntimeFact\\(params\\.resultFact"
|
|
17
|
-
],
|
|
18
|
-
"resultFact": "factAlmanacResults"
|
|
19
|
-
},
|
|
20
|
-
"operator": "fileContains",
|
|
21
|
-
"value": true
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
"event": {
|
|
27
|
-
"type": "warning",
|
|
28
|
-
"params": {
|
|
29
|
-
"message": "xfi facts should always add results to the almanac so that details can be reported.",
|
|
30
|
-
"details": "eg. almanac.addRuntimeFact(params.resultFact, result)"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "functionComplexity-iterative",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "notEqual",
|
|
9
|
-
"value": "REPO_GLOBAL_CHECK"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "functionComplexity",
|
|
13
|
-
"params": {
|
|
14
|
-
"resultFact": "complexityResult",
|
|
15
|
-
"thresholds": {
|
|
16
|
-
"cyclomaticComplexity": 25,
|
|
17
|
-
"cognitiveComplexity": 40,
|
|
18
|
-
"nestingDepth": 10,
|
|
19
|
-
"parameterCount": 5,
|
|
20
|
-
"returnCount": 10
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"operator": "astComplexity",
|
|
24
|
-
"value": true
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"event": {
|
|
29
|
-
"type": "warning",
|
|
30
|
-
"params": {
|
|
31
|
-
"message": "Functions detected with high complexity. Consider refactoring.",
|
|
32
|
-
"details": {
|
|
33
|
-
"fact": "complexityResult"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "functionCount-iterative",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.filePath",
|
|
8
|
-
"operator": "regexMatch",
|
|
9
|
-
"value": "^.*\\/facts\\/(?!.*\\.test).*\\.ts$"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "functionCount",
|
|
13
|
-
"params": {
|
|
14
|
-
"resultFact": "functionCountResult"
|
|
15
|
-
},
|
|
16
|
-
"operator": "functionCount",
|
|
17
|
-
"value": 20
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
"event": {
|
|
22
|
-
"type": "warning",
|
|
23
|
-
"params": {
|
|
24
|
-
"message": "File contains too many functions (>20). Consider splitting into multiple files.",
|
|
25
|
-
"details": {
|
|
26
|
-
"fact": "functionCountResult"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "invalidSystemIdConfigured-iterative",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "equal",
|
|
9
|
-
"value": "xfiTestMatch.json"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "remoteSubstringValidation",
|
|
13
|
-
"params": {
|
|
14
|
-
"pattern": "\"systemId\":[\\s]*\"([a-zA-Z0-9]*)\"",
|
|
15
|
-
"flags": "gi",
|
|
16
|
-
"validationParams": {
|
|
17
|
-
"url": "http://localhost:4200/systemIdValidator",
|
|
18
|
-
"method": "POST",
|
|
19
|
-
"headers": {
|
|
20
|
-
"Content-Type": "application/json"
|
|
21
|
-
},
|
|
22
|
-
"body": {
|
|
23
|
-
"systemId": "#MATCH#"
|
|
24
|
-
},
|
|
25
|
-
"checkJsonPath": "$.validSystems[?(@.id == '#MATCH#')]"
|
|
26
|
-
},
|
|
27
|
-
"resultFact": "remoteCheckResultFact"
|
|
28
|
-
},
|
|
29
|
-
"operator": "invalidRemoteValidation",
|
|
30
|
-
"value": true
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"event": {
|
|
35
|
-
"type": "fatality",
|
|
36
|
-
"params": {
|
|
37
|
-
"message": "One or more of the extracted strings failed remote validation.",
|
|
38
|
-
"details": {
|
|
39
|
-
"fact": "remoteCheckResultFact"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "lowMigrationToNewComponentLib-global",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "equal",
|
|
9
|
-
"value": "REPO_GLOBAL_CHECK"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "globalFileAnalysis",
|
|
13
|
-
"params": {
|
|
14
|
-
"newPatterns": [
|
|
15
|
-
"import.*from\\s+['\"](@mui/material.*)['\"]"
|
|
16
|
-
],
|
|
17
|
-
"legacyPatterns": [
|
|
18
|
-
"import.*from\\s+['\"](antd)['\"]"
|
|
19
|
-
],
|
|
20
|
-
"fileFilter": "\\.(js|jsx|ts|tsx)$",
|
|
21
|
-
"outputGrouping": "file",
|
|
22
|
-
"resultFact": "lowMigrationToNewComponentLib"
|
|
23
|
-
},
|
|
24
|
-
"operator": "globalPatternRatio",
|
|
25
|
-
"value": {
|
|
26
|
-
"threshold": 0.7,
|
|
27
|
-
"comparison": "lte"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"event": {
|
|
33
|
-
"type": "fatality",
|
|
34
|
-
"params": {
|
|
35
|
-
"message": "MUI migration from AntDesign is low.",
|
|
36
|
-
"details": {
|
|
37
|
-
"fact": "lowMigrationToNewComponentLib",
|
|
38
|
-
"recommendation": "Migrate to MUI."
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "missingRequiredFiles-global",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "equal",
|
|
9
|
-
"value": "REPO_GLOBAL_CHECK"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "missingRequiredFiles",
|
|
13
|
-
"params": {
|
|
14
|
-
"requiredFiles": [
|
|
15
|
-
"/README.md",
|
|
16
|
-
"../../src/\\core//cli&.ts",
|
|
17
|
-
"missingRequiredFiles-testing.js"
|
|
18
|
-
],
|
|
19
|
-
"resultFact": "missingRequiredFilesResult"
|
|
20
|
-
},
|
|
21
|
-
"operator": "missingRequiredFiles",
|
|
22
|
-
"value": true
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
"event": {
|
|
27
|
-
"type": "fatality",
|
|
28
|
-
"params": {
|
|
29
|
-
"message": "Required files are missing from the repository",
|
|
30
|
-
"details": {
|
|
31
|
-
"fact": "missingRequiredFilesResult"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "newSdkFeatureNotAdoped-global",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "equal",
|
|
9
|
-
"value": "REPO_GLOBAL_CHECK"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "globalFileAnalysis",
|
|
13
|
-
"params": {
|
|
14
|
-
"newPatterns": [
|
|
15
|
-
"processUserData"
|
|
16
|
-
],
|
|
17
|
-
"fileFilter": ".*\\.(ts|js)$",
|
|
18
|
-
"outputGrouping": "pattern",
|
|
19
|
-
"resultFact": "sdkUsageAnalysis"
|
|
20
|
-
},
|
|
21
|
-
"operator": "globalPatternCount",
|
|
22
|
-
"value": {
|
|
23
|
-
"threshold": 2,
|
|
24
|
-
"comparison": "lte"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"event": {
|
|
30
|
-
"type": "warning",
|
|
31
|
-
"params": {
|
|
32
|
-
"message": "The codebase does not appear to be using some important new SDK features.",
|
|
33
|
-
"details": {
|
|
34
|
-
"fact": "sdkUsageAnalysis"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "noDatabases-iterative",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "notEqual",
|
|
9
|
-
"value": "REPO_GLOBAL_CHECK"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "repoFileAnalysis",
|
|
13
|
-
"params": {
|
|
14
|
-
"checkPattern": [
|
|
15
|
-
"[\\s\\'\\\"\\.](oracle)[\\s\\'\\\"\\.]",
|
|
16
|
-
"[\\s\\'\\\"\\.](postgres)[\\s\\'\\\"\\.]",
|
|
17
|
-
"[\\s\\'\\\"\\.](mongodb)[\\s\\'\\\"\\.]"
|
|
18
|
-
],
|
|
19
|
-
"resultFact": "fileResultsDB"
|
|
20
|
-
},
|
|
21
|
-
"operator": "fileContains",
|
|
22
|
-
"value": true
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
"event": {
|
|
27
|
-
"type": "warning",
|
|
28
|
-
"params": {
|
|
29
|
-
"message": "code must not directly call databases",
|
|
30
|
-
"details": {
|
|
31
|
-
"fact": "fileResultsDB"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "nonStandardDirectoryStructure-global",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "equal",
|
|
9
|
-
"value": "REPO_GLOBAL_CHECK"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "fileData",
|
|
13
|
-
"path": "$.filePath",
|
|
14
|
-
"operator": "nonStandardDirectoryStructure",
|
|
15
|
-
"value": {
|
|
16
|
-
"fact": "standardStructure"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
"event": {
|
|
22
|
-
"type": "warning",
|
|
23
|
-
"params": {
|
|
24
|
-
"message": "directory structure does not match the standard.",
|
|
25
|
-
"details": {
|
|
26
|
-
"fact": "standardStructure"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "openaiAnalysisA11yRule-global",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "equal",
|
|
9
|
-
"value": "REPO_GLOBAL_CHECK"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "openaiAnalysis",
|
|
13
|
-
"params": {
|
|
14
|
-
"prompt": "Identify any accessibility (a11y) issues in the codebase.",
|
|
15
|
-
"resultFact": "openaiAnalysisA11y"
|
|
16
|
-
},
|
|
17
|
-
"operator": "openaiAnalysisHighSeverity",
|
|
18
|
-
"value": 7
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
"event": {
|
|
23
|
-
"type": "warning",
|
|
24
|
-
"params": {
|
|
25
|
-
"message": "OpenAI analysis detected accessibility (a11y) issues in the codebase.",
|
|
26
|
-
"details": {
|
|
27
|
-
"fact": "openaiAnalysisA11y"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "openaiAnalysisTestCriticality-global",
|
|
3
|
-
"conditions": {
|
|
4
|
-
"all": [
|
|
5
|
-
{
|
|
6
|
-
"fact": "fileData",
|
|
7
|
-
"path": "$.fileName",
|
|
8
|
-
"operator": "equal",
|
|
9
|
-
"value": "REPO_GLOBAL_CHECK"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"fact": "openaiAnalysis",
|
|
13
|
-
"params": {
|
|
14
|
-
"prompt": "what are the files and features in the codebase that are most likely to require unit test uplift in order to be able to trust pull-request checks?",
|
|
15
|
-
"resultFact": "openaiAnalysisTestCriticality"
|
|
16
|
-
},
|
|
17
|
-
"operator": "openaiAnalysisHighSeverity",
|
|
18
|
-
"value": 8
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
"event": {
|
|
23
|
-
"type": "warning",
|
|
24
|
-
"params": {
|
|
25
|
-
"message": "OpenAI suggestions for the supplied prompt.",
|
|
26
|
-
"details": {
|
|
27
|
-
"fact": "openaiAnalysisTestCriticality"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|