Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(engine_dast): new dast scanning engine. #140

Open
wants to merge 562 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
562 commits
Select commit Hold shift + click to select a range
dff9560
fix: syntax
Gaviria9601 Nov 21, 2024
c9ca3bc
Merge pull request #254 from bancolombia/feature/fix_syntax
Gaviria9601 Nov 21, 2024
641aab9
upgrade version to 1.19.1 version [skip ci]
Nov 21, 2024
53d98d6
fix(engine_risk): :memo: fix engine_risk when a pipeline has SKIP_FIL…
ssantaa9 Nov 21, 2024
d44e555
Merge pull request #255 from bancolombia/feature/fix_skip_files
ssantaa9 Nov 21, 2024
72599aa
upgrade version to 1.19.2 version [skip ci]
Nov 21, 2024
d30114f
refactor(engine_dast): :sparkles: Improve nuclei installation
russbelln Nov 22, 2024
93558f2
feat(engine_risk): :art: check threshold from risk exclusion file
ssantaa9 Nov 22, 2024
2c62a3d
test(engine_risk): :lipstick: Unit tests
ssantaa9 Nov 22, 2024
e6e214f
feature: change folder
sarbole Nov 22, 2024
6a4b82d
merge with trunk
sarbole Nov 22, 2024
e64c781
test secret
sarbole Nov 22, 2024
d53a0b2
fix: set threshold with compliance and cve
Gaviria9601 Nov 22, 2024
d1c98e0
Merge pull request #257 from bancolombia/feature/update_threshold
Gaviria9601 Nov 22, 2024
daba076
upgrade version to 1.19.3 version [skip ci]
Nov 22, 2024
04316a8
Merge pull request #256 from bancolombia/feature/risk_threshold
ssantaa9 Nov 25, 2024
162bc47
upgrade version to 1.20.0 version [skip ci]
Nov 25, 2024
863f9c0
fix(engine_dast): :bug: FIx nuclei windows install
russbelln Nov 25, 2024
1e181ee
fix(engine_dast): :bug: Fix nuclei release url
russbelln Nov 25, 2024
191bc24
test trufle
sarbole Nov 25, 2024
92cc747
fix(engine_dast): :bug: FIx fields in config tool files
russbelln Nov 25, 2024
3b0368f
refactor(engine_dast): :fire: Remove dast exclusion path field in con…
russbelln Nov 25, 2024
e00a2c8
refactor(engine_dast): :fire: Remove exclusion path field in example …
russbelln Nov 25, 2024
7a5c150
refactor(engine_dast): :fire: Restore .gitignore
russbelln Nov 25, 2024
f8cfddd
feat(report_sonar): differentiate maintenance message from invalid br…
jcamilomolinar Nov 25, 2024
5256d5c
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Nov 25, 2024
139dfaa
update github_apps
sarbole Nov 25, 2024
369ecb6
fix: bug with out of scope exclusions
Gaviria9601 Nov 25, 2024
43df67c
Merge pull request #260 from bancolombia/feature/fix_bug_out_scope
Gaviria9601 Nov 25, 2024
d5a1c27
Merge pull request #259 from bancolombia/feature/report_sonar
jcamilomolinar Nov 25, 2024
4b4de96
upgrade version to 1.21.0 version [skip ci]
Nov 25, 2024
24f786a
trufle
sarbole Nov 25, 2024
a6abd90
feat(github): new method to aut to github api
sarbole Nov 25, 2024
f6b592b
upgrade version to 1.22.0 version [skip ci]
Nov 25, 2024
e970440
feat(engine_sca): no update dependency check if already downloaded
jcamilomolinar Nov 27, 2024
90ee1de
deploy dev
jcamilomolinar Nov 27, 2024
7838344
fix dependencies threashold
ssantaa9 Nov 27, 2024
264c069
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Nov 27, 2024
bbd05cd
Merge pull request #262 from bancolombia/feature/fix_threshold
ssantaa9 Nov 28, 2024
5895d23
feature: get docker image base
sarbole Nov 28, 2024
549b386
try to exclude
sarbole Nov 28, 2024
f12d655
feat: add sbom tool to get components
Gaviria9601 Nov 28, 2024
df67086
deploy dev
Gaviria9601 Nov 28, 2024
7531034
test: fix unit tests
Gaviria9601 Nov 28, 2024
2c50f6e
deploy dev
Gaviria9601 Nov 28, 2024
a83e0f8
deploy dev
Gaviria9601 Nov 28, 2024
3b08f6b
deploy dev
Gaviria9601 Nov 28, 2024
cc7bfe3
deploy dev
Gaviria9601 Nov 28, 2024
fef433e
deploy dev
Gaviria9601 Nov 28, 2024
6f65063
deploy dev
Gaviria9601 Nov 28, 2024
ac93fad
deploy dev
Gaviria9601 Nov 28, 2024
1c59a71
feat(engine_sca): show vulnerabilities according to their confidence …
jcamilomolinar Nov 28, 2024
e808426
test(engine_sca): adjust deserializator tests
jcamilomolinar Nov 28, 2024
382ae82
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Nov 28, 2024
7a6f7ec
test(engine_sca): fix test
jcamilomolinar Nov 28, 2024
df41a58
deploy dev
jcamilomolinar Nov 28, 2024
6dda628
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Nov 29, 2024
5d27d11
refactor(engine_core): delete runtime local functionality
jcamilomolinar Nov 29, 2024
275a7e3
deploy dev
jcamilomolinar Nov 29, 2024
2feb88b
chore: revert version
jcamilomolinar Nov 29, 2024
bf6b3c8
chore: revert version
jcamilomolinar Nov 29, 2024
5b2e834
Merge pull request #252 from bancolombia/feature/prerelease_rules
jcamilomolinar Nov 29, 2024
b215d0e
upgrade version to 1.23.0 version [skip ci]
Nov 29, 2024
6040068
docs: update readme engine utilities with sonarqube module
jcamilomolinar Nov 29, 2024
2560a49
Merge pull request #263 from bancolombia/feature/update_readme
jcamilomolinar Nov 29, 2024
cfe10d2
update get exclusion
sarbole Nov 29, 2024
667babe
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
sarbole Nov 29, 2024
8647973
fix(engine_core): flags remote config description
jcamilomolinar Nov 29, 2024
622ff07
fix(engine_core): flags remote config description
sarbole Nov 29, 2024
5d4f3fb
upgrade version to 1.23.1 version [skip ci]
Nov 29, 2024
714f0f6
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
sarbole Nov 29, 2024
c51e167
fix(container): add base image vulnerability
sarbole Nov 29, 2024
9f60452
feat(engine_sca): deserialize dependency check findings from XML and …
jcamilomolinar Nov 29, 2024
22d89cd
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Nov 29, 2024
407f873
fix(engine_sca): cvss deserialize in dependency check
jcamilomolinar Nov 30, 2024
d99e3e2
fix(container): adjust test
sarbole Dec 2, 2024
cc44ff9
feature(container) : add some test
sarbole Dec 2, 2024
5e26945
feat: handle name sbom generated and pool connections
Gaviria9601 Dec 2, 2024
6b57e19
deploy dev
Gaviria9601 Dec 2, 2024
7ae9cbf
deploy dev
jcamilomolinar Dec 2, 2024
e923d96
deploy dev
Gaviria9601 Dec 2, 2024
88219f3
fix(engine_risk): :bug: bug with services endings
ssantaa9 Dec 2, 2024
449039a
Merge pull request #265 from bancolombia/feature/refactor_risk_endings
ssantaa9 Dec 2, 2024
1f8f1b5
upgrade version to 1.23.2 version [skip ci]
Dec 2, 2024
b8d787c
chore: no update version
jcamilomolinar Dec 2, 2024
f705c76
chore: no update version
jcamilomolinar Dec 2, 2024
5abffc7
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Dec 2, 2024
fda5529
feature(container): add baseImage to json
sarbole Dec 2, 2024
061d1ed
fix(engine_sca): no update flag always
jcamilomolinar Dec 2, 2024
d9e073c
Merge pull request #266 from bancolombia/feature/dependency_check
jcamilomolinar Dec 2, 2024
0dc5dbe
upgrade version to 1.24.0 version [skip ci]
Dec 2, 2024
ec08326
fix: :bug: Added to solve the missing information reported in #267
GeorgeLBS1 Dec 2, 2024
b25bd71
fix(report_sonar): use pipeline name when github is repo provider
jcamilomolinar Dec 2, 2024
35d10bd
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Dec 2, 2024
c2d7716
chore: update report sonar config tool example
jcamilomolinar Dec 2, 2024
cb012bb
fix(engine_container): fix trivy and test
sarbole Dec 2, 2024
37dec5c
test: add unit tests
Gaviria9601 Dec 2, 2024
17dc616
refactor: gitignore
Gaviria9601 Dec 2, 2024
98ba34b
refactor: gitignore update
Gaviria9601 Dec 2, 2024
838c82e
Merge pull request #270 from bancolombia/feature/report_sonar
jcamilomolinar Dec 2, 2024
c1b689c
upgrade version to 1.24.1 version [skip ci]
Dec 2, 2024
370b37e
test: add unit tests
Gaviria9601 Dec 2, 2024
3d2bca8
test: fix unit tests
Gaviria9601 Dec 2, 2024
4abda14
style: code smells
Gaviria9601 Dec 2, 2024
60fa80c
feat: add group in deserealizator
Gaviria9601 Dec 3, 2024
aeadc90
fix(report_sonar): delete scope regex validation
jcamilomolinar Dec 3, 2024
ca6adb8
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Dec 3, 2024
0812e40
fix(report_sonar): delete unused dependencies
jcamilomolinar Dec 3, 2024
523bdd0
Merge pull request #272 from bancolombia/feature/report_sonar
jcamilomolinar Dec 3, 2024
ff4ec7c
upgrade version to 1.24.2 version [skip ci]
Dec 3, 2024
1feea50
handle where to engine_dependencies with new update
Gaviria9601 Dec 3, 2024
5add102
deploy dev
Gaviria9601 Dec 3, 2024
39ab771
Merge branch 'trunk' into feature/sbom_component
Gaviria9601 Dec 3, 2024
640091d
fix: Prevent SonarQube execution on forked PRs
dhfherna Dec 4, 2024
e21e633
Merge pull request #273 from dhfherna/fix-workflows
dhfherna Dec 4, 2024
39624d8
upgrade version to 1.24.3 version [skip ci]
Dec 4, 2024
e50fa97
Merge branch 'bancolombia:trunk' into patch-1
GeorgeLBS1 Dec 4, 2024
d59a16a
Merge pull request #268 from GeorgeLBS1/patch-1
Gaviria9601 Dec 5, 2024
2006929
upgrade version to 1.24.4 version [skip ci]
Dec 5, 2024
e21d2af
feat(engine_sca): improve where finding property for dependency check
jcamilomolinar Dec 5, 2024
153b370
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Dec 5, 2024
1ed3a06
fix(engine_sca): get where maven type case
jcamilomolinar Dec 9, 2024
8acee6c
add remote config for get image base
sarbole Dec 9, 2024
8d6f514
add some unit test
sarbole Dec 9, 2024
a7c004d
validate if image base is empty
sarbole Dec 9, 2024
b593591
fix: comment peer review
Gaviria9601 Dec 9, 2024
e133274
fix: comments peer review
Gaviria9601 Dec 9, 2024
7603dde
test: fix unit test
Gaviria9601 Dec 9, 2024
afd042d
write_image_base
sarbole Dec 10, 2024
6548f86
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
sarbole Dec 10, 2024
7449dac
Merge pull request #274 from bancolombia/feature/dependency_check
jcamilomolinar Dec 10, 2024
b3ebbf9
upgrade version to 1.25.0 version [skip ci]
Dec 10, 2024
c7f1f7c
fix(container): add some test for new method
sarbole Dec 10, 2024
32c6ca2
add config file example
sarbole Dec 10, 2024
d353c64
remove trivy
sarbole Dec 10, 2024
6a4a30d
revert trivy and adjust set_input_core
sarbole Dec 10, 2024
664ab52
adjust logic get_exclusions
sarbole Dec 10, 2024
cb56f02
print base_image
sarbole Dec 10, 2024
6d5b7e5
fix(engine_container): search exclusions for base image
sarbole Dec 11, 2024
a7adfd8
upgrade version to 1.25.1 version [skip ci]
Dec 11, 2024
8e283c4
fix: fix conflicts
Gaviria9601 Dec 12, 2024
42b678e
refactor: code smells sonar
Gaviria9601 Dec 12, 2024
d22f76c
Merge pull request #271 from bancolombia/feature/sbom_component
Gaviria9601 Dec 12, 2024
f44914f
upgrade version to 1.26.0 version [skip ci]
Dec 12, 2024
2a9d64c
fix(report_sonar): use branch tag instead branch name
jcamilomolinar Dec 17, 2024
30d0155
Merge pull request #275 from bancolombia/feature/report_sonar
jcamilomolinar Dec 17, 2024
69e9bde
upgrade version to 1.26.1 version [skip ci]
Dec 17, 2024
f2ca639
change image base name
sarbole Dec 17, 2024
51c5aed
fix(container): change image base name
sarbole Dec 17, 2024
6d3cf9d
upgrade version to 1.26.2 version [skip ci]
Dec 17, 2024
1e19e78
write image base
sarbole Dec 18, 2024
555de4c
adjust test
sarbole Dec 18, 2024
76f2de0
fix(container): Write image base
sarbole Dec 18, 2024
e7aad69
upgrade version to 1.26.3 version [skip ci]
Dec 18, 2024
ab625b4
remove true
sarbole Dec 23, 2024
655de3d
Merge pull request #279 from bancolombia/feature/utils_true
sarbole Dec 23, 2024
aefb325
please
sarbole Dec 23, 2024
46b45f3
fix(utils): fix utils download artifact
sarbole Dec 23, 2024
cd9feca
upgrade version to 1.26.4 version [skip ci]
Dec 23, 2024
4be1248
fix(engine_secret): adjust deserialize config tool, use configure ext…
cajlopezor Dec 23, 2024
3a91d2c
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
cajlopezor Dec 23, 2024
8bac221
fix(engine_secret): adjust folder path flag
cajlopezor Dec 24, 2024
d2f0120
feat(engine_sca): improve dependency check error logs
jcamilomolinar Dec 24, 2024
a649169
Merge pull request #281 from bancolombia/feature/dependency_check
jcamilomolinar Dec 24, 2024
a38fb2c
upgrade version to 1.27.0 version [skip ci]
Dec 24, 2024
d74f000
refactored for parameterization of cmdb consumption
MikeHV14 Dec 26, 2024
2fbdb12
fix(secrets): add unit test
cajlopezor Dec 26, 2024
9d8595a
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Dec 27, 2024
f1911a4
feat(engine_secret): new gitleaks driven adapter
jcamilomolinar Dec 27, 2024
c1386cd
deploy dev
jcamilomolinar Dec 27, 2024
c983606
deploy dev
jcamilomolinar Dec 27, 2024
3c9fc15
fix(engine_secret): add variables to documentation and fix validations
cajlopezor Dec 30, 2024
929c315
fix(engine_secret): add variables to readme
cajlopezor Dec 30, 2024
ac06ccc
Merge branch 'fix/engine_secret_win' of https://github.com/bancolombi…
jcamilomolinar Dec 30, 2024
19a5452
feat(engine_secrets): add gitleaks scan type in defect dojo adapter
jcamilomolinar Dec 30, 2024
21c77f1
deploy dev
jcamilomolinar Dec 30, 2024
ff618e7
fix(engine_secret): change enable_custom_rules variable to boolean
cajlopezor Jan 2, 2025
e0f1e71
fix(engine_secret): delete import and file DeserializeConfigTool
cajlopezor Jan 2, 2025
9640e81
fix(engine_secret): delete import DeserializeConfigTool in test
cajlopezor Jan 2, 2025
58251dd
Merge branch 'fix/engine_secret_win' of https://github.com/bancolombi…
jcamilomolinar Jan 2, 2025
ce53701
fix(engine_secret): delete import DeserializeConfigTool in test
cajlopezor Jan 2, 2025
c62b68d
fix(gitleaks): adjust driven adapter
jcamilomolinar Jan 2, 2025
19f006b
fix(gitleaks): adjust driven adapter
jcamilomolinar Jan 2, 2025
cbc043d
fix(engine_secret): delete import DeserializeConfigTool in test
cajlopezor Jan 2, 2025
e310ead
feat(gitleaks): use external checks for gitleaks
jcamilomolinar Jan 3, 2025
b95746e
deploy dev
jcamilomolinar Jan 3, 2025
9bbf9e1
deploy dev
jcamilomolinar Jan 3, 2025
dd274a8
fix(gitleaks): improve flags order in command
jcamilomolinar Jan 7, 2025
62801b2
deploy dev
jcamilomolinar Jan 7, 2025
bd0e281
deploy dev
jcamilomolinar Jan 7, 2025
40e45e9
deploy dev
jcamilomolinar Jan 7, 2025
1a40b60
Merge pull request #283 from bancolombia/fix/engine_secret_win
cajlopezor Jan 7, 2025
dc96f29
upgrade version to 1.27.1 version [skip ci]
Jan 7, 2025
502f35a
feat(gitleaks): include hidden secret in the where of the finding
jcamilomolinar Jan 7, 2025
9890d79
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Jan 7, 2025
4fa2dca
add documentation of use cmdb and update unit test
MikeHV14 Jan 8, 2025
8225845
Change encoding remote config in runtime local
MikeHV14 Jan 9, 2025
c6356de
Merge branch 'trunk' into feature/parametrize_cmdb
MikeHV14 Jan 9, 2025
d3d928d
feat(engine_risk): :sparkles: Handle Remediation threshold Rate by to…
ssantaa9 Jan 9, 2025
9f48358
feat(parametrize_cmdb): adjustment in readme and change of the name o…
MikeHV14 Jan 10, 2025
beeb509
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
ssantaa9 Jan 10, 2025
dc0b883
Merge pull request #282 from bancolombia/feature/parametrize_cmdb
MikeHV14 Jan 13, 2025
1daa33a
upgrade version to 1.28.0 version [skip ci]
Jan 13, 2025
15233c8
fix(xray): verify architecture of machine to download the appropriate…
MikeHV14 Jan 13, 2025
fb511df
Merge pull request #285 from bancolombia/feature/jfrog_cli
MikeHV14 Jan 13, 2025
ffa0179
upgrade version to 1.28.1 version [skip ci]
Jan 13, 2025
eaa1d4b
feat: include vulnerability id as id in defect dojo exclusions
jcamilomolinar Jan 13, 2025
19666b4
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Jan 13, 2025
418a251
deploy dev
ssantaa9 Jan 13, 2025
08c9fe1
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
ssantaa9 Jan 13, 2025
3f7493c
Merge pull request #286 from bancolombia/feature/dependency_check
jcamilomolinar Jan 13, 2025
8b2815d
upgrade version to 1.29.0 version [skip ci]
Jan 13, 2025
7748dc8
deploy dev
ssantaa9 Jan 13, 2025
b479838
restore version
ssantaa9 Jan 13, 2025
3474806
Merge pull request #287 from bancolombia/feature/risk_rr
ssantaa9 Jan 13, 2025
25ffa22
upgrade version to 1.30.0 version [skip ci]
Jan 13, 2025
aba51be
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Jan 14, 2025
56148ed
fix create report exclusion
ssantaa9 Jan 14, 2025
18a4cae
Merge pull request #288 from bancolombia/feature/fix_create_exclusion
ssantaa9 Jan 14, 2025
09ff3eb
trying to update version
ssantaa9 Jan 14, 2025
7da5651
fix: :memo: fix create report exclusion
ssantaa9 Jan 14, 2025
9b72e3c
upgrade version to 1.30.1 version [skip ci]
Jan 14, 2025
dd5450f
fix: :memo: fix create exclusion particular cases
ssantaa9 Jan 14, 2025
777f818
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
ssantaa9 Jan 14, 2025
68325e7
style(engine_core): :memo: apply black to defect dojo driven adapter
ssantaa9 Jan 14, 2025
f3ee009
Merge pull request #290 from bancolombia/feature/fix_create_exclusion
ssantaa9 Jan 14, 2025
73b94f9
upgrade version to 1.30.2 version [skip ci]
Jan 14, 2025
281e10d
fix(deps): update dependencies (#258)
app-toolkit-opensource-innersource[bot] Jan 15, 2025
77bbe8b
upgrade version to 1.7.0 version [skip ci]
Jan 15, 2025
060b239
fix(gitleaks): pr comments and sonar issues
jcamilomolinar Jan 16, 2025
af48336
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Jan 16, 2025
7182388
fix(gitleaks): reduce run tool complexity for sonar
jcamilomolinar Jan 16, 2025
dfac9fa
feat: 🚀 handle finding exclusion - white_list
Gaviria9601 Jan 16, 2025
60ca9fe
fix conflicts
Gaviria9601 Jan 16, 2025
bb08b18
deploy dev
Gaviria9601 Jan 16, 2025
a1b2e77
deploy dev
jcamilomolinar Jan 16, 2025
a22e038
rollback version
Gaviria9601 Jan 16, 2025
6bb8c8f
fix bug date format - deploy dev
Gaviria9601 Jan 16, 2025
4fa6958
fix error import scan - deploy dev
Gaviria9601 Jan 16, 2025
4ceeb7f
ready to merge
Gaviria9601 Jan 16, 2025
e6d3f62
Merge pull request #291 from bancolombia/feature/white_list
Gaviria9601 Jan 17, 2025
0b659cf
upgrade version to 1.31.0 version [skip ci]
Jan 17, 2025
b9236c9
Merge branch 'trunk' of https://github.com/bancolombia/devsecops-engi…
jcamilomolinar Jan 17, 2025
ab9154d
Merge pull request #284 from bancolombia/feature/gitleaks
jcamilomolinar Jan 18, 2025
1193c6b
upgrade version to 1.32.0 version [skip ci]
Jan 18, 2025
d8ec5f9
fix(engine_secret): download custom rules if enabled
cajlopezor Jan 20, 2025
70d292c
Merge pull request #293 from bancolombia/fix/engine_secret
cajlopezor Jan 20, 2025
546186c
upgrade version to 1.32.1 version [skip ci]
Jan 20, 2025
b97fb4c
Merge branch 'feature/engine_dast_nu' of https://github.com/bancolomb…
jcamilomolinar Jan 22, 2025
37db2fc
fix: handle failed test and conflicts
jcamilomolinar Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
russbelln marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,7 @@ jf.exe
target
dependencies_to_scan
node_modules
DevSecOps_Remote_Config
DevSecOps_Remote_Config
/azp
result_dast_scan.json
/customized-nuclei-templates
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def get_inputs_from_cli(args):
parser.add_argument("--token_vulnerability_management", required=False, help="Token to connect to the Vulnerability Management")
parser.add_argument("--token_engine_container", required=False, help="Token to execute engine_container if is necessary")
parser.add_argument("--token_engine_dependencies", required=False, help="Token to execute engine_dependencies if is necessary")
parser.add_argument("--dast_file_path", required=False, help="Engine DAST path file")
args = parser.parse_args()
return {
"platform_devops": args.platform_devops,
Expand All @@ -90,6 +91,7 @@ def get_inputs_from_cli(args):
"token_vulnerability_management": args.token_vulnerability_management,
"token_engine_container": args.token_engine_container,
"token_engine_dependencies": args.token_engine_dependencies,
"dast_file_path": args.dast_file_path
}

def application_core():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
from devsecops_engine_tools.engine_sca.engine_dependencies.src.applications.runner_dependencies_scan import (
runner_engine_dependencies,
)
from devsecops_engine_tools.engine_dast.src.applications.runner_dast_scan import (
runner_engine_dast
)
from devsecops_engine_tools.engine_core.src.infrastructure.helpers.util import (
define_env,
)

from devsecops_engine_tools.engine_utilities.utils.logger_info import MyLogger
from devsecops_engine_tools.engine_utilities import settings

Expand Down Expand Up @@ -121,7 +123,13 @@ def process(self, dict_args: any, config_tool: any):
)
return findings_list, input_core
elif "engine_dast" in dict_args["tool"]:
print(MESSAGE_ENABLED)
findings_list, input_core = runner_engine_dast(
dict_args,
config_tool,
secret_tool,
self.devops_platform_gateway
)
return findings_list, input_core
elif "engine_secret" in dict_args["tool"]:
findings_list, input_core = runner_secret_scan(
dict_args,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import json
from typing import List
from devsecops_engine_tools.engine_dast.src.infrastructure.entry_points.entry_point_dast import (
init_engine_dast,
)
from devsecops_engine_tools.engine_dast.src.infrastructure.driven_adapters.nuclei.nuclei_tool import (
NucleiTool,
)
from devsecops_engine_tools.engine_dast.src.infrastructure.driven_adapters.jwt.jwt_object import (
JwtObject,
)
from devsecops_engine_tools.engine_dast.src.infrastructure.driven_adapters.jwt.jwt_tool import (
JwtTool,
)
from devsecops_engine_tools.engine_dast.src.infrastructure.driven_adapters.oauth.generic_oauth import (
GenericOauth,
)
from devsecops_engine_tools.engine_dast.src.infrastructure.driven_adapters.http.client.auth_client import (
AuthClientCredential,
)
from devsecops_engine_tools.engine_dast.src.domain.model.api_config import (
ApiConfig
)
from devsecops_engine_tools.engine_dast.src.domain.model.api_operation import (
ApiOperation
)


def runner_engine_dast(dict_args, config_tool, secret_tool, devops_platform):
try:
# Define driven adapters
# Initialize variables
devops_platform_gateway = devops_platform
extra_tools = []
target_config = None

# Filling operations list with adapters
with open(dict_args["dast_file_path"], 'r') as dast_file:
data = json.load(dast_file)
if "operations" in data: # Api
operations: List = []
for elem in data["operations"]:
security_type = elem["operation"]["security_auth"]["type"].lower()
if security_type == "jwt":
operations.append(
ApiOperation(
elem,
JwtObject(
elem["operation"]["security_auth"]
)))
elif security_type == "oauth":
operations.append(
ApiOperation(
elem,
GenericOauth(
elem["operation"]["security_auth"]
)
)
)
else:
operations.append(
ApiOperation(
elem,
AuthClientCredential(
elem["operation"]["security_auth"]
)
)
)
data["operations"] = operations
target_config = ApiConfig(data)
else: # Web Application
pass


if config_tool["ENGINE_DAST"]["TOOL"].lower() == "nuclei": # tool_gateway is the main Tool
tool_run = NucleiTool()

if any((k.lower() == "jwt") for k in config_tool["ENGINE_DAST"]["EXTRA_TOOLS"]) and \
any(isinstance(o.authentication_gateway, JwtObject) for o in data["operations"] ):
extra_tools.append(JwtTool(target_config))

return init_engine_dast(
devops_platform_gateway=devops_platform_gateway,
tool_gateway=tool_run,
dict_args=dict_args,
secret_tool=secret_tool,
config_tool=config_tool,
extra_tools=extra_tools,
target_data=target_config
)

except KeyError as e:
raise KeyError(f"Error accessing the key in runner engine dast: {str(e)}")
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from typing import List
from devsecops_engine_tools.engine_dast.src.domain.model.api_operation import ApiOperation

class ApiConfig():
def __init__(self, api_data: dict):
try:
self.target_type: str = "API"
self.endpoint: str = api_data["endpoint"]
self.rate_limit: str = api_data.get("rate_limit")
self.operations: "List[ApiOperation]" = api_data["operations"]
except KeyError:
raise KeyError("Configuración faltante, validar endpoint y acda uno de los operations")
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class ApiOperation():
def __init__(self, operation, authentication_gateway):
self.authentication_gateway = authentication_gateway
self.data = operation
self.credentials = ("auth_header", "token")

def authenticate(self):
self.credentials = self.authentication_gateway.get_credentials()
if self.credentials is not None:
self.data["headers"][self.credentials[0]] = self.credentials[1]
russbelln marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from devsecops_engine_tools.engine_core.src.domain.model.threshold import Threshold


class ConfigTool:
def __init__(self, json_data, tool):
self.version = json_data[tool]["VERSION"]
self.exclusions_path = json_data[tool]["EXCLUSIONS_PATH"]
self.use_external_checks_git = json_data[tool]["USE_EXTERNAL_CHECKS_GIT"]
self.external_checks_git = json_data[tool]["EXTERNAL_CHECKS_GIT"]
self.repository_ssh_host = json_data[tool]["EXTERNAL_GIT_SSH_HOST"]
self.repository_public_key_fp = json_data[tool][
"EXTERNAL_GIT_PUBLIC_KEY_FINGERPRINT"
]
self.use_external_checks_dir = json_data[tool]["USE_EXTERNAL_CHECKS_DIR"]
self.external_dir_owner = json_data[tool]["EXTERNAL_DIR_OWNER"]
self.external_dir_repository = json_data[tool]["EXTERNAL_DIR_REPOSITORY"]
self.external_asset_name = json_data[tool]["EXTERNAL_DIR_ASSET_NAME"]
self.message_info_dast = json_data[tool]["MESSAGE_INFO_DAST"]
self.threshold = Threshold(json_data[tool]["THRESHOLD"])
self.rules_data_type = json_data[tool]["RULES"]
self.scope_pipeline = ""
self.exclusions = None
self.exclusions_all = None
self.exclusions_scope = None
self.rules_all = {}
russbelln marked this conversation as resolved.
Show resolved Hide resolved
russbelln marked this conversation as resolved.
Show resolved Hide resolved
russbelln marked this conversation as resolved.
Show resolved Hide resolved
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from abc import ABCMeta, abstractmethod


class AuthenticationGateway(metaclass=ABCMeta):
@abstractmethod
def get_credentials(self) -> dict:
"get_credentials"
russbelln marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from abc import ABCMeta, abstractmethod


class DevopsPlatformGateway(metaclass=ABCMeta):
@abstractmethod
def get_remote_config(self, remote_config_repo, remote_config_path_file) -> dict:
"get_remote_config"

@abstractmethod
def get_variable(self, variable):
"get_variable"
russbelln marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from abc import ABCMeta, abstractmethod


class RemoteConfigGateway(metaclass=ABCMeta):
@abstractmethod
def get_remote_json_config(
self, remote_config_repo, remote_config_path_file
) -> dict:
"remote config"
russbelln marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from dataclasses import dataclass
from abc import ABCMeta, abstractmethod


@dataclass
class Token(metaclass=ABCMeta):
token: str

@abstractmethod
def get_token(self):
"return_token"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from abc import ABCMeta, abstractmethod


class ToolGateway(metaclass=ABCMeta):
@abstractmethod
def run_tool(
self, init_config_tool, exclusions, environment, pipeline, secret_tool
) -> str:
"run_tool"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class SecurityAuth():
def __init__(self, authentication_gateway):
print()
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class WaConfig:
def __init__(self, data: dict):
self.target_type: str = "WA"
self.url: str = data["endpoint"]
self.data: dict = data.wa_data
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
from typing import (
List, Tuple, Any
)
from devsecops_engine_tools.engine_dast.src.domain.model.gateways.tool_gateway import (
ToolGateway,
)
from devsecops_engine_tools.engine_dast.src.domain.model.gateways.devops_platform_gateway import (
octaviovg marked this conversation as resolved.
Show resolved Hide resolved
DevopsPlatformGateway,
)
from devsecops_engine_tools.engine_core.src.domain.model.input_core import (
InputCore,
)
from devsecops_engine_tools.engine_core.src.domain.model.exclusions import (
Exclusions,
)
from devsecops_engine_tools.engine_dast.src.domain.model.config_tool import (
ConfigTool,
)

class DastScan:
def __init__(
self,
tool_gateway: ToolGateway,
devops_platform_gateway: DevopsPlatformGateway,
data_target,
aditional_tools: "List[ToolGateway]"
):
self.tool_gateway = tool_gateway
self.devops_platform_gateway = devops_platform_gateway
self.data_target = data_target
self.other_tools = aditional_tools

def complete_config_tool(
self, data_file_tool, exclusions, tool
) -> "Tuple[ConfigTool, Any]":
config_tool = ConfigTool(
json_data=data_file_tool,
tool=tool,
)

config_tool.exclusions = exclusions
config_tool.scope_pipeline = self.devops_platform_gateway.get_variable(
"pipeline_name"
)

if config_tool.exclusions.get("All") is not None:
config_tool.exclusions_all = config_tool.exclusions.get("All").get(
tool
)
if config_tool.exclusions.get(config_tool.scope_pipeline) is not None:
config_tool.exclusions_scope = config_tool.exclusions.get(
config_tool.scope_pipeline
).get(config_tool)

data_target_config = self.data_target
return config_tool, data_target_config

def process(
self, dict_args, secret_tool, config_tool
) -> "Tuple[List, InputCore]":
init_config_tool = self.devops_platform_gateway.get_remote_config(
dict_args["remote_config_repo"], "engine_dast/configTool.json"
)

exclusions = self.devops_platform_gateway.get_remote_config(
dict_args["remote_config_repo"],
"engine_dast/Exclusions.json"
)


config_tool, data_target = self.complete_config_tool(
data_file_tool=init_config_tool,
exclusions=exclusions,
tool=config_tool["ENGINE_DAST"]["TOOL"],
)

finding_list, path_file_results = self.tool_gateway.run_tool(
target_data=data_target,
config_tool=config_tool,
secret_tool=secret_tool,
)
#Here exceute other tools and append to finding list
if len(self.other_tools) > 0:
extra_finding_list = self.other_tools[0].run_tool(
target_data=data_target,
config_tool=config_tool
)
if len(extra_finding_list) > 0:
finding_list.extend(extra_finding_list)

totalized_exclusions = []
(
totalized_exclusions.extend(
map(
lambda elem: Exclusions(**elem), config_tool.exclusions_all
)
)
if config_tool.exclusions_all is not None
else None
)
(
totalized_exclusions.extend(
map(
lambda elem: Exclusions(**elem),
config_tool.exclusions_scope,
)
)
if config_tool.exclusions_scope is not None
else None
)

input_core = InputCore(
totalized_exclusions=totalized_exclusions,
threshold_defined=config_tool.threshold,
path_file_results=path_file_results,
custom_message_break_build=config_tool.message_info_dast,
scope_pipeline=config_tool.scope_pipeline,
stage_pipeline="Release",
)

return finding_list, input_core
Loading
Loading