From 61a858c1755f5439bfcc862ee9a06ed5a842767e Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 8 Jan 2024 08:13:44 -0800 Subject: [PATCH 001/197] Release/0.2.0 beta/test 1 (#456) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bb221109..7d21f73e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,7 +51,7 @@ pipeline { stage('Unit Testing') { agent { docker { - image 'securityuniversal/jenkins-python-agent:latest' + image 'securityuniversal/jenkins:latest' } } when { From 3c06d22040399db5e89b30f2f0a9dbb7c13f164d Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 8 Jan 2024 13:26:41 -0800 Subject: [PATCH 002/197] Release/0.2.0 beta/test 1 (#458) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7d21f73e..1fffa348 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -99,7 +99,7 @@ pipeline { stage('Software Composition Analysis') { agent { docker { - image 'securityuniversal/jenkins-codetesting-agent:latest' + image 'securityuniversal/jenkins:latest' } } when { @@ -127,7 +127,7 @@ pipeline { stage('Static Application Security Testing') { agent { docker { - image 'securityuniversal/jenkins-codetesting-agent:latest' + image 'securityuniversal/jenkins:latest' } } when { From 2048a736b2550139374cd4ca5e5aed589546581e Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:36:28 -0800 Subject: [PATCH 003/197] Release/0.2.0 beta/test 1 (#460) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml --- pipeline-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 9d98c47f..68f8f7cf 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -23,7 +23,7 @@ stages: - Python - Javascript sast: - enabled: true + enabled: false branches: - release codeLanguages: From fd72e21852e64004f58976e101ea8976c86ced37 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:07:51 -0800 Subject: [PATCH 004/197] Release/0.2.0 beta/test 1 (#462) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml --- pipeline-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 68f8f7cf..2b33b743 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -9,14 +9,14 @@ stages: branches: - release unitTesting: - enabled: true + enabled: false branches: [] secretScanning: enabled: true branches: - release sca: - enabled: true + enabled: false branches: - release codeLanguages: @@ -37,19 +37,19 @@ stages: branches: - release containerScan: - enabled: true + enabled: false branches: - release containerName: secusphere containerTag: latest releaseToTest: - enabled: true + enabled: false branches: - release serviceName: secusphere containerTag: latest testRelease: - enabled: true + enabled: false branches: - release targetUrl: 'http://192.168.0.68:5010' From 7e019fe2605dcef34f9667981fd01b95a5efe26e Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:14:20 -0800 Subject: [PATCH 005/197] Release/0.2.0 beta/test 1 (#464) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml --- pipeline-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 2b33b743..c54451b7 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -56,7 +56,7 @@ stages: dastTestType: full apiTargetUrl: 'http://192.168.0.68:5010/api/openapi.yaml' securityQualityGate: - enabled: true + enabled: false branches: - release deploy: From bf129376027b8bed489da0f7f1fcd5ba0227368a Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:25:54 -0800 Subject: [PATCH 006/197] Release/0.2.0 beta/test 1 (#466) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 1fffa348..a0e0cd5d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -316,6 +316,7 @@ pipeline { agent { docker { image 'securityuniversal/jenkins-deploy-agent:latest' + args '--group-add 999' } } when { From cb6f25a1a5b245dd708d06a9bc4290b1ea9a1676 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:00:00 -0800 Subject: [PATCH 007/197] Release/0.2.0 beta/test 1 (#468) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py --- src/vr/vulns/model/sgglobalthresholds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vr/vulns/model/sgglobalthresholds.py b/src/vr/vulns/model/sgglobalthresholds.py index 0309bae3..09a2d3f1 100644 --- a/src/vr/vulns/model/sgglobalthresholds.py +++ b/src/vr/vulns/model/sgglobalthresholds.py @@ -8,7 +8,7 @@ class SgGlobalThresholds(db.Model): __tablename__ = 'SgGlobalThresholds' __table_args__ = {'extend_existing': True} ID = db.Column(db.Integer, primary_key=True) - Name = db.Column(db.String) + Name = db.Column(db.String(100)) AddDate = db.Column(db.DateTime) ThreshScaLow = db.Column(db.Integer) ThreshScaMedium = db.Column(db.Integer) From 5c923878ba0d8e7c1068c71e577e073f2eff2f5c Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:21:40 -0800 Subject: [PATCH 008/197] Release/0.2.0 beta/test 1 (#470) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py --- src/vr/functions/initial_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vr/functions/initial_setup.py b/src/vr/functions/initial_setup.py index abc1228d..1132f9c9 100644 --- a/src/vr/functions/initial_setup.py +++ b/src/vr/functions/initial_setup.py @@ -217,7 +217,7 @@ def setup_core_db_tables(ENV): if ENV == 'test': sql = 'INSERT INTO SgGlobalThresholds (Name, AddDate, ThreshScaLow, ThreshScaMedium, ThreshScaHigh, ThreshScaCritical, ThreshContainerLow, ThreshContainerMedium, ThreshContainerHigh, ThreshContainerCritical, ThreshDastLow, ThreshDastMedium, ThreshDastHigh, ThreshDastCritical, ThreshDastApiLow, ThreshDastApiMedium, ThreshDastApiHigh, ThreshDastApiCritical, ThreshInfrastructureLow, ThreshInfrastructureMedium, ThreshInfrastructureHigh, ThreshInfrastructureCritical, ThreshSastLow, ThreshSastMedium, ThreshSastHigh, ThreshSastCritical, ThreshIacLow, ThreshIacMedium, ThreshIacHigh, ThreshIacCritical, ThreshSecretsLow, ThreshSecretsMedium, ThreshSecretsHigh, ThreshSecretsCritical) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)' else: - sql = 'INSERT INTO SgGlobalThresholds (Name, AddDate, ThreshScaLow, ThreshScaMedium, ThreshScaHigh, ThreshScaCritical, ThreshContainerLow, ThreshContainerMedium, ThreshContainerHigh, ThreshContainerCritical, ThreshDastLow, ThreshDastMedium, ThreshDastHigh, ThreshDastCritical, ThreshDastApiLow, ThreshDastApiMedium, ThreshDastApiHigh, ThreshDastApiCritical, ThreshInfrastructureLow, ThreshInfrastructureMedium, ThreshInfrastructureHigh, ThreshInfrastructureCritical, ThreshSastLow, ThreshSastMedium, ThreshSastHigh, ThreshSastCritical, ThreshIacLow, ThreshIacMedium, ThreshIacHigh, ThreshIacCritical, ThreshSecretsLow, ThreshSecretsMedium, ThreshSecretsHigh, ThreshSecretsCritical) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)' + sql = 'INSERT INTO SgGlobalThresholds (Name, AddDate, ThreshScaLow, ThreshScaMedium, ThreshScaHigh, ThreshScaCritical, ThreshContainerLow, ThreshContainerMedium, ThreshContainerHigh, ThreshContainerCritical, ThreshDastLow, ThreshDastMedium, ThreshDastHigh, ThreshDastCritical, ThreshDastApiLow, ThreshDastApiMedium, ThreshDastApiHigh, ThreshDastApiCritical, ThreshInfrastructureLow, ThreshInfrastructureMedium, ThreshInfrastructureHigh, ThreshInfrastructureCritical, ThreshSastLow, ThreshSastMedium, ThreshSastHigh, ThreshSastCritical, ThreshIacLow, ThreshIacMedium, ThreshIacHigh, ThreshIacCritical, ThreshSecretsLow, ThreshSecretsMedium, ThreshSecretsHigh, ThreshSecretsCritical) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)' args = ("General", now, None,None,4,0,None,None,2,0,None,None,0,2,None,None,0,2,None,None,0,2,None,None,0,2,None,None,0,2,None,None,0,2) cur.execute(sql, args) db.commit() From d0edd8f43198c3e36fe21e092a87b05a5679668a Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Fri, 12 Jan 2024 20:34:28 -0800 Subject: [PATCH 009/197] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a0e0cd5d..d2593530 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -326,7 +326,7 @@ pipeline { // Condition for a Test-* branch expression { // Split the branch name by '/' and check if the last segment starts with 'Test-' - env.BRANCH_NAME.split('/').last().startsWith('Test') + env.BRANCH_NAME.split('/').last().startsWith('staging') } } } From 6bc2607e607869e15e8ed4e2814f5428b1a7ccc1 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:06:35 -0800 Subject: [PATCH 010/197] Update pipeline-config.yaml --- pipeline-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index c54451b7..2267ddc6 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -75,6 +75,7 @@ stages: azure.azTenantId: 'azTenantId' serviceCredentials: {} serviceSetStrings: + app.env: test app.extUrl: "192.168.0.150" app.db.prodDbUriRef: "PROD-DB-URI" app.smtp.host: "smtp.sendgrid.net:587" From 4e2bc4af7db96e100b2dfa52480a626b9046cabb Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Fri, 12 Jan 2024 22:22:47 -0800 Subject: [PATCH 011/197] Update values.yaml --- ci_cd/helm/secusphere/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_cd/helm/secusphere/values.yaml b/ci_cd/helm/secusphere/values.yaml index 8f2bcf7d..abba5342 100644 --- a/ci_cd/helm/secusphere/values.yaml +++ b/ci_cd/helm/secusphere/values.yaml @@ -3,7 +3,7 @@ # Declare variables to be passed into your templates. environment: prod appName: "secusphere" -appDomain: "acme.com" +appDomain: "securityuniversal.com" tlsSecretName: su-wildcard-tls From fba2f2bcd1453922682cc605c3e0387e43d12dfe Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:10:34 -0800 Subject: [PATCH 012/197] Update values.yaml --- ci_cd/helm/su-secrets/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_cd/helm/su-secrets/values.yaml b/ci_cd/helm/su-secrets/values.yaml index 3bba9d33..97c59f40 100644 --- a/ci_cd/helm/su-secrets/values.yaml +++ b/ci_cd/helm/su-secrets/values.yaml @@ -8,6 +8,6 @@ azure: tls: enabled: true - name: "dynamic" + name: "su-wildcard-tls" crt: "dynamic" key: "dynamic" From 1a298c05ea84e93dc9eda4314e6796a6e11abe7b Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sun, 14 Jan 2024 23:13:47 -0800 Subject: [PATCH 013/197] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d2593530..b45f5c3d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -326,7 +326,7 @@ pipeline { // Condition for a Test-* branch expression { // Split the branch name by '/' and check if the last segment starts with 'Test-' - env.BRANCH_NAME.split('/').last().startsWith('staging') + env.BRANCH_NAME.split('/').last().startsWith('staging') || env.BRANCH_NAME.split('/').last().startsWith('Prod') } } } From ef00ba59f8b78977252d313d3a83725d9c4e852d Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 15 Jan 2024 08:39:41 -0800 Subject: [PATCH 014/197] Update values.yaml --- ci_cd/helm/secusphere/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_cd/helm/secusphere/values.yaml b/ci_cd/helm/secusphere/values.yaml index abba5342..8a4fce89 100644 --- a/ci_cd/helm/secusphere/values.yaml +++ b/ci_cd/helm/secusphere/values.yaml @@ -83,7 +83,7 @@ volumes: claimName: su-webapp-pv-claim ingress: - enabled: true + enabled: false serviceAccount: # Specifies whether a service account should be created From f497be3383606476ced847f9fef26186d372ab51 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:19:36 -0800 Subject: [PATCH 015/197] Update pipeline-config.yaml --- pipeline-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 2267ddc6..daaeead8 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -75,14 +75,14 @@ stages: azure.azTenantId: 'azTenantId' serviceCredentials: {} serviceSetStrings: - app.env: test - app.extUrl: "192.168.0.150" + app.env: prod + app.extUrl: "secusphere.securityuniversal.com" app.db.prodDbUriRef: "PROD-DB-URI" app.smtp.host: "smtp.sendgrid.net:587" app.smtp.user: apikey app.smtp.adminEmail: "admin@securityuniversal.com" - app.smtp.passwordRef: "SENDGRID-SMTP-PW" - app.az.keyVaultName: "BkDevSecOpsKeyVault" + app.smtp.passwordRef: "SMTP-PW" + app.az.keyVaultName: "ss-keyvault" post: enabled: true branches: From 89910f9e41767e491c37fd43983b34e16d11f326 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 16 Jan 2024 20:28:00 -0800 Subject: [PATCH 016/197] Release/0.2.0 beta/staging (#472) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Feature/jenkinsfile updates (#471) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations --- Jenkinsfile | 2 +- ci_cd/helm/secusphere/values.yaml | 2 +- ci_cd/helm/su-secrets/values.yaml | 2 +- pipeline-config.yaml | 1 + src/config_engine.py | 130 +++++++++++++++++------------- src/settings.py | 2 + src/vr/templates/base_auth.html | 1 + 7 files changed, 83 insertions(+), 57 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a0e0cd5d..d2593530 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -326,7 +326,7 @@ pipeline { // Condition for a Test-* branch expression { // Split the branch name by '/' and check if the last segment starts with 'Test-' - env.BRANCH_NAME.split('/').last().startsWith('Test') + env.BRANCH_NAME.split('/').last().startsWith('staging') } } } diff --git a/ci_cd/helm/secusphere/values.yaml b/ci_cd/helm/secusphere/values.yaml index 8f2bcf7d..abba5342 100644 --- a/ci_cd/helm/secusphere/values.yaml +++ b/ci_cd/helm/secusphere/values.yaml @@ -3,7 +3,7 @@ # Declare variables to be passed into your templates. environment: prod appName: "secusphere" -appDomain: "acme.com" +appDomain: "securityuniversal.com" tlsSecretName: su-wildcard-tls diff --git a/ci_cd/helm/su-secrets/values.yaml b/ci_cd/helm/su-secrets/values.yaml index 3bba9d33..97c59f40 100644 --- a/ci_cd/helm/su-secrets/values.yaml +++ b/ci_cd/helm/su-secrets/values.yaml @@ -8,6 +8,6 @@ azure: tls: enabled: true - name: "dynamic" + name: "su-wildcard-tls" crt: "dynamic" key: "dynamic" diff --git a/pipeline-config.yaml b/pipeline-config.yaml index c54451b7..2267ddc6 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -75,6 +75,7 @@ stages: azure.azTenantId: 'azTenantId' serviceCredentials: {} serviceSetStrings: + app.env: test app.extUrl: "192.168.0.150" app.db.prodDbUriRef: "PROD-DB-URI" app.smtp.host: "smtp.sendgrid.net:587" diff --git a/src/config_engine.py b/src/config_engine.py index 0168cb9a..07400d06 100644 --- a/src/config_engine.py +++ b/src/config_engine.py @@ -9,7 +9,7 @@ SET_APP_EXT_URL from settings import SET_PROD_DB_URI_REF, SET_SMTP_PW_REF, SET_JENKINS_KEY_REF, SET_JENKINS_USER_REF, SET_JENKINS_TOKEN_REF from settings import SET_PROD_DB_URI, SET_SMTP_PW, SET_JENKINS_KEY, SET_JENKINS_USER, \ - SET_JENKINS_HOST, SET_JENKINS_PROJECT, SET_JENKINS_TOKEN, SET_JENKINS_STAGING_PROJECT + SET_JENKINS_HOST, SET_JENKINS_PROJECT, SET_JENKINS_TOKEN, SET_JENKINS_STAGING_PROJECT, SET_JENKINS_ENABLED, SET_SNOW_ENABLED from settings import SET_AZAD_CLIENT_ID, SET_AZAD_CLIENT_SECRET, SET_AZAD_AUTHORITY from settings import SET_SNOW_INSTANCE_NAME, SET_SNOW_CLIENT_ID, SET_SNOW_CLIENT_SECRET, SET_SNOW_USERNAME, SET_SNOW_PASSWORD, SET_SNOW_CLIENT_SECRET_REF, SET_SNOW_PASSWORD_REF @@ -205,65 +205,87 @@ def delete_cert(self, secret_name): ## ## GitHub to Jenkins Webhook ## -if ENV == 'prod': - if os.getenv('JENKINS_USER'): - JENKINS_USER = KeyVaultManager().get_secret(os.getenv('JENKINS_USER')) - else: - JENKINS_USER = KeyVaultManager().get_secret(SET_JENKINS_USER_REF) - if os.getenv('JENKINS_KEY'): - JENKINS_KEY = KeyVaultManager().get_secret(os.getenv('JENKINS_KEY')) - else: - JENKINS_KEY = KeyVaultManager().get_secret(SET_JENKINS_KEY_REF) - if os.getenv('JENKINS_TOKEN'): - JENKINS_TOKEN = KeyVaultManager().get_secret(os.getenv('JENKINS_TOKEN')) - else: - JENKINS_TOKEN = KeyVaultManager().get_secret(SET_JENKINS_TOKEN_REF) +if os.getenv('JENKINS_ENABLED'): + JENKINS_ENABLED = os.getenv('JENKINS_ENABLED') else: - JENKINS_USER = SET_JENKINS_USER - JENKINS_KEY = SET_JENKINS_KEY - JENKINS_TOKEN = SET_JENKINS_TOKEN + JENKINS_ENABLED = SET_JENKINS_ENABLED +if JENKINS_ENABLED == 'yes': + if ENV == 'prod': + if os.getenv('JENKINS_USER'): + JENKINS_USER = KeyVaultManager().get_secret(os.getenv('JENKINS_USER')) + else: + JENKINS_USER = KeyVaultManager().get_secret(SET_JENKINS_USER_REF) + if os.getenv('JENKINS_KEY'): + JENKINS_KEY = KeyVaultManager().get_secret(os.getenv('JENKINS_KEY')) + else: + JENKINS_KEY = KeyVaultManager().get_secret(SET_JENKINS_KEY_REF) + if os.getenv('JENKINS_TOKEN'): + JENKINS_TOKEN = KeyVaultManager().get_secret(os.getenv('JENKINS_TOKEN')) + else: + JENKINS_TOKEN = KeyVaultManager().get_secret(SET_JENKINS_TOKEN_REF) + else: + JENKINS_USER = SET_JENKINS_USER + JENKINS_KEY = SET_JENKINS_KEY + JENKINS_TOKEN = SET_JENKINS_TOKEN -if os.getenv('JENKINS_PROJECT'): - JENKINS_PROJECT = os.getenv('JENKINS_PROJECT') -else: - JENKINS_PROJECT = SET_JENKINS_PROJECT + if os.getenv('JENKINS_PROJECT'): + JENKINS_PROJECT = os.getenv('JENKINS_PROJECT') + else: + JENKINS_PROJECT = SET_JENKINS_PROJECT -if os.getenv('JENKINS_HOST'): - JENKINS_HOST = os.getenv('JENKINS_HOST') -else: - JENKINS_HOST = SET_JENKINS_HOST + if os.getenv('JENKINS_HOST'): + JENKINS_HOST = os.getenv('JENKINS_HOST') + else: + JENKINS_HOST = SET_JENKINS_HOST -if os.getenv('JENKINS_STAGING_PROJECT'): - JENKINS_STAGING_PROJECT = os.getenv('JENKINS_STAGING_PROJECT') + if os.getenv('JENKINS_STAGING_PROJECT'): + JENKINS_STAGING_PROJECT = os.getenv('JENKINS_STAGING_PROJECT') + else: + JENKINS_STAGING_PROJECT = SET_JENKINS_STAGING_PROJECT else: - JENKINS_STAGING_PROJECT = SET_JENKINS_STAGING_PROJECT - + JENKINS_USER = "" + JENKINS_KEY = "" + JENKINS_TOKEN = "" + JENKINS_PROJECT = "" + JENKINS_HOST = "" + JENKINS_STAGING_PROJECT = "" ## ServiceNOW Integration -if ENV == 'prod': - if os.getenv('SNOW_PASSWORD'): - SNOW_PASSWORD = KeyVaultManager().get_secret(os.getenv('SNOW_PASSWORD')) - else: - SNOW_PASSWORD = KeyVaultManager().get_secret(SET_SNOW_PASSWORD_REF) - if os.getenv('SNOW_CLIENT_SECRET'): - SNOW_CLIENT_SECRET = KeyVaultManager().get_secret(os.getenv('SNOW_CLIENT_SECRET')) - else: - SNOW_CLIENT_SECRET = KeyVaultManager().get_secret(SET_SNOW_CLIENT_SECRET_REF) - if os.getenv('SNOW_INSTANCE_NAME'): - SNOW_INSTANCE_NAME = KeyVaultManager().get_secret(os.getenv('SNOW_INSTANCE_NAME')) - else: - SNOW_INSTANCE_NAME = KeyVaultManager().get_secret(SET_SNOW_INSTANCE_NAME) - if os.getenv('SNOW_CLIENT_ID'): - SNOW_CLIENT_ID = KeyVaultManager().get_secret(os.getenv('SNOW_CLIENT_ID')) - else: - SNOW_CLIENT_ID = KeyVaultManager().get_secret(SET_SNOW_CLIENT_ID) - if os.getenv('SNOW_USERNAME'): - SNOW_USERNAME = KeyVaultManager().get_secret(os.getenv('SNOW_USERNAME')) +if os.getenv('SNOW_ENABLED'): + SNOW_ENABLED = os.getenv('SNOW_ENABLED') +else: + SNOW_ENABLED = SET_SNOW_ENABLED +if SNOW_ENABLED == 'yes': + if ENV == 'prod': + if os.getenv('SNOW_PASSWORD'): + SNOW_PASSWORD = KeyVaultManager().get_secret(os.getenv('SNOW_PASSWORD')) + else: + SNOW_PASSWORD = KeyVaultManager().get_secret(SET_SNOW_PASSWORD_REF) + if os.getenv('SNOW_CLIENT_SECRET'): + SNOW_CLIENT_SECRET = KeyVaultManager().get_secret(os.getenv('SNOW_CLIENT_SECRET')) + else: + SNOW_CLIENT_SECRET = KeyVaultManager().get_secret(SET_SNOW_CLIENT_SECRET_REF) + if os.getenv('SNOW_INSTANCE_NAME'): + SNOW_INSTANCE_NAME = os.getenv('SNOW_INSTANCE_NAME') + else: + SNOW_INSTANCE_NAME = SET_SNOW_INSTANCE_NAME + if os.getenv('SNOW_CLIENT_ID'): + SNOW_CLIENT_ID = os.getenv('SNOW_CLIENT_ID') + else: + SNOW_CLIENT_ID = SET_SNOW_CLIENT_ID + if os.getenv('SNOW_USERNAME'): + SNOW_USERNAME = os.getenv('SNOW_USERNAME') + else: + SNOW_USERNAME = SET_SNOW_USERNAME else: - SNOW_USERNAME = KeyVaultManager().get_secret(SET_SNOW_USERNAME) + SNOW_PASSWORD = SET_SNOW_PASSWORD + SNOW_CLIENT_SECRET = SET_SNOW_CLIENT_SECRET + SNOW_INSTANCE_NAME = SET_SNOW_INSTANCE_NAME + SNOW_CLIENT_ID = SET_SNOW_CLIENT_ID + SNOW_USERNAME = SET_SNOW_USERNAME else: - SNOW_PASSWORD = SET_SNOW_PASSWORD - SNOW_CLIENT_SECRET = SET_SNOW_CLIENT_SECRET - SNOW_INSTANCE_NAME = SET_SNOW_INSTANCE_NAME - SNOW_CLIENT_ID = SET_SNOW_CLIENT_ID - SNOW_USERNAME = SET_SNOW_USERNAME + SNOW_PASSWORD = "" + SNOW_CLIENT_SECRET = "" + SNOW_INSTANCE_NAME = "" + SNOW_CLIENT_ID = "" + SNOW_USERNAME = "" diff --git a/src/settings.py b/src/settings.py index 7273b90b..a893a2f0 100644 --- a/src/settings.py +++ b/src/settings.py @@ -39,6 +39,7 @@ ## ## Jenkins Webhook Settings (Optional) ## +SET_JENKINS_ENABLED = 'no' SET_JENKINS_KEY_REF = 'JENKINS-KEY' SET_JENKINS_USER_REF = 'JENKINS-USER' SET_JENKINS_TOKEN_REF = 'JENKINS-TOKEN' @@ -51,6 +52,7 @@ SET_JENKINS_TOKEN = 'changeme' ## ServiceNOW Settings +SET_SNOW_ENABLED = 'no' SET_SNOW_INSTANCE_NAME = 'dev124268' SET_SNOW_CLIENT_ID = '1ab21bf476013110e1ce39e1f368c2fa' SET_SNOW_CLIENT_SECRET_REF = 'SNOW-SECRET' diff --git a/src/vr/templates/base_auth.html b/src/vr/templates/base_auth.html index 5886557d..df697bc2 100644 --- a/src/vr/templates/base_auth.html +++ b/src/vr/templates/base_auth.html @@ -15,6 +15,7 @@ + From ee6d9dd0bfb3c7ffd9ad26ff43ee391f3443ced6 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 16 Jan 2024 20:29:15 -0800 Subject: [PATCH 017/197] Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations --- src/config_engine.py | 130 +++++++++++++++++++------------- src/settings.py | 2 + src/vr/templates/base_auth.html | 1 + 3 files changed, 79 insertions(+), 54 deletions(-) diff --git a/src/config_engine.py b/src/config_engine.py index 0168cb9a..07400d06 100644 --- a/src/config_engine.py +++ b/src/config_engine.py @@ -9,7 +9,7 @@ SET_APP_EXT_URL from settings import SET_PROD_DB_URI_REF, SET_SMTP_PW_REF, SET_JENKINS_KEY_REF, SET_JENKINS_USER_REF, SET_JENKINS_TOKEN_REF from settings import SET_PROD_DB_URI, SET_SMTP_PW, SET_JENKINS_KEY, SET_JENKINS_USER, \ - SET_JENKINS_HOST, SET_JENKINS_PROJECT, SET_JENKINS_TOKEN, SET_JENKINS_STAGING_PROJECT + SET_JENKINS_HOST, SET_JENKINS_PROJECT, SET_JENKINS_TOKEN, SET_JENKINS_STAGING_PROJECT, SET_JENKINS_ENABLED, SET_SNOW_ENABLED from settings import SET_AZAD_CLIENT_ID, SET_AZAD_CLIENT_SECRET, SET_AZAD_AUTHORITY from settings import SET_SNOW_INSTANCE_NAME, SET_SNOW_CLIENT_ID, SET_SNOW_CLIENT_SECRET, SET_SNOW_USERNAME, SET_SNOW_PASSWORD, SET_SNOW_CLIENT_SECRET_REF, SET_SNOW_PASSWORD_REF @@ -205,65 +205,87 @@ def delete_cert(self, secret_name): ## ## GitHub to Jenkins Webhook ## -if ENV == 'prod': - if os.getenv('JENKINS_USER'): - JENKINS_USER = KeyVaultManager().get_secret(os.getenv('JENKINS_USER')) - else: - JENKINS_USER = KeyVaultManager().get_secret(SET_JENKINS_USER_REF) - if os.getenv('JENKINS_KEY'): - JENKINS_KEY = KeyVaultManager().get_secret(os.getenv('JENKINS_KEY')) - else: - JENKINS_KEY = KeyVaultManager().get_secret(SET_JENKINS_KEY_REF) - if os.getenv('JENKINS_TOKEN'): - JENKINS_TOKEN = KeyVaultManager().get_secret(os.getenv('JENKINS_TOKEN')) - else: - JENKINS_TOKEN = KeyVaultManager().get_secret(SET_JENKINS_TOKEN_REF) +if os.getenv('JENKINS_ENABLED'): + JENKINS_ENABLED = os.getenv('JENKINS_ENABLED') else: - JENKINS_USER = SET_JENKINS_USER - JENKINS_KEY = SET_JENKINS_KEY - JENKINS_TOKEN = SET_JENKINS_TOKEN + JENKINS_ENABLED = SET_JENKINS_ENABLED +if JENKINS_ENABLED == 'yes': + if ENV == 'prod': + if os.getenv('JENKINS_USER'): + JENKINS_USER = KeyVaultManager().get_secret(os.getenv('JENKINS_USER')) + else: + JENKINS_USER = KeyVaultManager().get_secret(SET_JENKINS_USER_REF) + if os.getenv('JENKINS_KEY'): + JENKINS_KEY = KeyVaultManager().get_secret(os.getenv('JENKINS_KEY')) + else: + JENKINS_KEY = KeyVaultManager().get_secret(SET_JENKINS_KEY_REF) + if os.getenv('JENKINS_TOKEN'): + JENKINS_TOKEN = KeyVaultManager().get_secret(os.getenv('JENKINS_TOKEN')) + else: + JENKINS_TOKEN = KeyVaultManager().get_secret(SET_JENKINS_TOKEN_REF) + else: + JENKINS_USER = SET_JENKINS_USER + JENKINS_KEY = SET_JENKINS_KEY + JENKINS_TOKEN = SET_JENKINS_TOKEN -if os.getenv('JENKINS_PROJECT'): - JENKINS_PROJECT = os.getenv('JENKINS_PROJECT') -else: - JENKINS_PROJECT = SET_JENKINS_PROJECT + if os.getenv('JENKINS_PROJECT'): + JENKINS_PROJECT = os.getenv('JENKINS_PROJECT') + else: + JENKINS_PROJECT = SET_JENKINS_PROJECT -if os.getenv('JENKINS_HOST'): - JENKINS_HOST = os.getenv('JENKINS_HOST') -else: - JENKINS_HOST = SET_JENKINS_HOST + if os.getenv('JENKINS_HOST'): + JENKINS_HOST = os.getenv('JENKINS_HOST') + else: + JENKINS_HOST = SET_JENKINS_HOST -if os.getenv('JENKINS_STAGING_PROJECT'): - JENKINS_STAGING_PROJECT = os.getenv('JENKINS_STAGING_PROJECT') + if os.getenv('JENKINS_STAGING_PROJECT'): + JENKINS_STAGING_PROJECT = os.getenv('JENKINS_STAGING_PROJECT') + else: + JENKINS_STAGING_PROJECT = SET_JENKINS_STAGING_PROJECT else: - JENKINS_STAGING_PROJECT = SET_JENKINS_STAGING_PROJECT - + JENKINS_USER = "" + JENKINS_KEY = "" + JENKINS_TOKEN = "" + JENKINS_PROJECT = "" + JENKINS_HOST = "" + JENKINS_STAGING_PROJECT = "" ## ServiceNOW Integration -if ENV == 'prod': - if os.getenv('SNOW_PASSWORD'): - SNOW_PASSWORD = KeyVaultManager().get_secret(os.getenv('SNOW_PASSWORD')) - else: - SNOW_PASSWORD = KeyVaultManager().get_secret(SET_SNOW_PASSWORD_REF) - if os.getenv('SNOW_CLIENT_SECRET'): - SNOW_CLIENT_SECRET = KeyVaultManager().get_secret(os.getenv('SNOW_CLIENT_SECRET')) - else: - SNOW_CLIENT_SECRET = KeyVaultManager().get_secret(SET_SNOW_CLIENT_SECRET_REF) - if os.getenv('SNOW_INSTANCE_NAME'): - SNOW_INSTANCE_NAME = KeyVaultManager().get_secret(os.getenv('SNOW_INSTANCE_NAME')) - else: - SNOW_INSTANCE_NAME = KeyVaultManager().get_secret(SET_SNOW_INSTANCE_NAME) - if os.getenv('SNOW_CLIENT_ID'): - SNOW_CLIENT_ID = KeyVaultManager().get_secret(os.getenv('SNOW_CLIENT_ID')) - else: - SNOW_CLIENT_ID = KeyVaultManager().get_secret(SET_SNOW_CLIENT_ID) - if os.getenv('SNOW_USERNAME'): - SNOW_USERNAME = KeyVaultManager().get_secret(os.getenv('SNOW_USERNAME')) +if os.getenv('SNOW_ENABLED'): + SNOW_ENABLED = os.getenv('SNOW_ENABLED') +else: + SNOW_ENABLED = SET_SNOW_ENABLED +if SNOW_ENABLED == 'yes': + if ENV == 'prod': + if os.getenv('SNOW_PASSWORD'): + SNOW_PASSWORD = KeyVaultManager().get_secret(os.getenv('SNOW_PASSWORD')) + else: + SNOW_PASSWORD = KeyVaultManager().get_secret(SET_SNOW_PASSWORD_REF) + if os.getenv('SNOW_CLIENT_SECRET'): + SNOW_CLIENT_SECRET = KeyVaultManager().get_secret(os.getenv('SNOW_CLIENT_SECRET')) + else: + SNOW_CLIENT_SECRET = KeyVaultManager().get_secret(SET_SNOW_CLIENT_SECRET_REF) + if os.getenv('SNOW_INSTANCE_NAME'): + SNOW_INSTANCE_NAME = os.getenv('SNOW_INSTANCE_NAME') + else: + SNOW_INSTANCE_NAME = SET_SNOW_INSTANCE_NAME + if os.getenv('SNOW_CLIENT_ID'): + SNOW_CLIENT_ID = os.getenv('SNOW_CLIENT_ID') + else: + SNOW_CLIENT_ID = SET_SNOW_CLIENT_ID + if os.getenv('SNOW_USERNAME'): + SNOW_USERNAME = os.getenv('SNOW_USERNAME') + else: + SNOW_USERNAME = SET_SNOW_USERNAME else: - SNOW_USERNAME = KeyVaultManager().get_secret(SET_SNOW_USERNAME) + SNOW_PASSWORD = SET_SNOW_PASSWORD + SNOW_CLIENT_SECRET = SET_SNOW_CLIENT_SECRET + SNOW_INSTANCE_NAME = SET_SNOW_INSTANCE_NAME + SNOW_CLIENT_ID = SET_SNOW_CLIENT_ID + SNOW_USERNAME = SET_SNOW_USERNAME else: - SNOW_PASSWORD = SET_SNOW_PASSWORD - SNOW_CLIENT_SECRET = SET_SNOW_CLIENT_SECRET - SNOW_INSTANCE_NAME = SET_SNOW_INSTANCE_NAME - SNOW_CLIENT_ID = SET_SNOW_CLIENT_ID - SNOW_USERNAME = SET_SNOW_USERNAME + SNOW_PASSWORD = "" + SNOW_CLIENT_SECRET = "" + SNOW_INSTANCE_NAME = "" + SNOW_CLIENT_ID = "" + SNOW_USERNAME = "" diff --git a/src/settings.py b/src/settings.py index 7273b90b..a893a2f0 100644 --- a/src/settings.py +++ b/src/settings.py @@ -39,6 +39,7 @@ ## ## Jenkins Webhook Settings (Optional) ## +SET_JENKINS_ENABLED = 'no' SET_JENKINS_KEY_REF = 'JENKINS-KEY' SET_JENKINS_USER_REF = 'JENKINS-USER' SET_JENKINS_TOKEN_REF = 'JENKINS-TOKEN' @@ -51,6 +52,7 @@ SET_JENKINS_TOKEN = 'changeme' ## ServiceNOW Settings +SET_SNOW_ENABLED = 'no' SET_SNOW_INSTANCE_NAME = 'dev124268' SET_SNOW_CLIENT_ID = '1ab21bf476013110e1ce39e1f368c2fa' SET_SNOW_CLIENT_SECRET_REF = 'SNOW-SECRET' diff --git a/src/vr/templates/base_auth.html b/src/vr/templates/base_auth.html index 5886557d..df697bc2 100644 --- a/src/vr/templates/base_auth.html +++ b/src/vr/templates/base_auth.html @@ -15,6 +15,7 @@ + From 22a872bdb968b65b6fb45010ac0d0c6fcd30a25e Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:44:25 -0800 Subject: [PATCH 018/197] Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins --- Jenkinsfile | 2 ++ src/vr/__init__.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b45f5c3d..dd45e119 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -342,6 +342,8 @@ pipeline { 'secretsSetStrings': stageConfig?.secretsSetStrings, 'serviceCredentials': stageConfig?.serviceCredentials, 'serviceSetStrings': stageConfig?.serviceSetStrings, + 'dockerReg': 'secunicontainerregistry.azurecr.io', + 'imgPullSecret': 'acrCreds' ]) } diff --git a/src/vr/__init__.py b/src/vr/__init__.py index b74f78d5..e1bc03cf 100644 --- a/src/vr/__init__.py +++ b/src/vr/__init__.py @@ -2,7 +2,7 @@ import requests from config_engine import ENV, PROD_DB_URI, AUTH_TYPE, APP_EXT_URL, LDAP_HOST, LDAP_PORT, LDAP_BASE_DN, \ LDAP_USER_DN, LDAP_GROUP_DN, LDAP_USER_RDN_ATTR, LDAP_USER_LOGIN_ATTR, LDAP_BIND_USER_DN, LDAP_BIND_USER_PASSWORD, \ - AZAD_CLIENT_ID, AZAD_CLIENT_SECRET, AZAD_AUTHORITY, JENKINS_USER + AZAD_CLIENT_ID, AZAD_CLIENT_SECRET, AZAD_AUTHORITY, JENKINS_USER, JENKINS_ENABLED from flask import Flask from flask_bootstrap import Bootstrap from flask_login import LoginManager @@ -448,4 +448,5 @@ def get_jenkins_data(): # Call the Jobs Here # train_model_every_six_hours() -get_jenkins_data_every_hour() +if JENKINS_ENABLED == 'yes': + get_jenkins_data_every_hour() From 3579078404975f80b0b7e5082b792daaf95f5a48 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:48:20 -0800 Subject: [PATCH 019/197] Release/0.1.0 beta/prod azure (#475) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins --- Jenkinsfile | 4 +++- ci_cd/helm/secusphere/values.yaml | 2 +- pipeline-config.yaml | 8 ++++---- src/vr/__init__.py | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d2593530..dd45e119 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -326,7 +326,7 @@ pipeline { // Condition for a Test-* branch expression { // Split the branch name by '/' and check if the last segment starts with 'Test-' - env.BRANCH_NAME.split('/').last().startsWith('staging') + env.BRANCH_NAME.split('/').last().startsWith('staging') || env.BRANCH_NAME.split('/').last().startsWith('Prod') } } } @@ -342,6 +342,8 @@ pipeline { 'secretsSetStrings': stageConfig?.secretsSetStrings, 'serviceCredentials': stageConfig?.serviceCredentials, 'serviceSetStrings': stageConfig?.serviceSetStrings, + 'dockerReg': 'secunicontainerregistry.azurecr.io', + 'imgPullSecret': 'acrCreds' ]) } diff --git a/ci_cd/helm/secusphere/values.yaml b/ci_cd/helm/secusphere/values.yaml index abba5342..8a4fce89 100644 --- a/ci_cd/helm/secusphere/values.yaml +++ b/ci_cd/helm/secusphere/values.yaml @@ -83,7 +83,7 @@ volumes: claimName: su-webapp-pv-claim ingress: - enabled: true + enabled: false serviceAccount: # Specifies whether a service account should be created diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 2267ddc6..daaeead8 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -75,14 +75,14 @@ stages: azure.azTenantId: 'azTenantId' serviceCredentials: {} serviceSetStrings: - app.env: test - app.extUrl: "192.168.0.150" + app.env: prod + app.extUrl: "secusphere.securityuniversal.com" app.db.prodDbUriRef: "PROD-DB-URI" app.smtp.host: "smtp.sendgrid.net:587" app.smtp.user: apikey app.smtp.adminEmail: "admin@securityuniversal.com" - app.smtp.passwordRef: "SENDGRID-SMTP-PW" - app.az.keyVaultName: "BkDevSecOpsKeyVault" + app.smtp.passwordRef: "SMTP-PW" + app.az.keyVaultName: "ss-keyvault" post: enabled: true branches: diff --git a/src/vr/__init__.py b/src/vr/__init__.py index b74f78d5..e1bc03cf 100644 --- a/src/vr/__init__.py +++ b/src/vr/__init__.py @@ -2,7 +2,7 @@ import requests from config_engine import ENV, PROD_DB_URI, AUTH_TYPE, APP_EXT_URL, LDAP_HOST, LDAP_PORT, LDAP_BASE_DN, \ LDAP_USER_DN, LDAP_GROUP_DN, LDAP_USER_RDN_ATTR, LDAP_USER_LOGIN_ATTR, LDAP_BIND_USER_DN, LDAP_BIND_USER_PASSWORD, \ - AZAD_CLIENT_ID, AZAD_CLIENT_SECRET, AZAD_AUTHORITY, JENKINS_USER + AZAD_CLIENT_ID, AZAD_CLIENT_SECRET, AZAD_AUTHORITY, JENKINS_USER, JENKINS_ENABLED from flask import Flask from flask_bootstrap import Bootstrap from flask_login import LoginManager @@ -448,4 +448,5 @@ def get_jenkins_data(): # Call the Jobs Here # train_model_every_six_hours() -get_jenkins_data_every_hour() +if JENKINS_ENABLED == 'yes': + get_jenkins_data_every_hour() From 11694577abc210f1e409b4018451a66a2265c2b0 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 26 Feb 2024 17:18:42 -0800 Subject: [PATCH 020/197] Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dd45e119..52b47457 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -199,7 +199,8 @@ pipeline { jslStageWrapper('Build Docker Service') { script { jslBuildDocker([ - 'serviceName': env.appName + 'serviceName': env.appName, + 'dockerReg': 'secunicontainerregistry.azurecr.io' ]) } } @@ -230,7 +231,7 @@ pipeline { def stageConfig = jslReadYamlConfig('containerScan') def containerName = stageConfig?.containerName def containerTag = stageConfig?.containerTag - jslContainerSecurityScanning(containerName, containerTag) + jslContainerSecurityScanning(containerName, containerTag, 'secunicontainerregistry.azurecr.io') } } } From cc245e482868746e24f4e7d523df71e8ad8db82f Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Mon, 26 Feb 2024 17:19:14 -0800 Subject: [PATCH 021/197] Release/0.1.0 beta/prod azure (#477) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dd45e119..52b47457 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -199,7 +199,8 @@ pipeline { jslStageWrapper('Build Docker Service') { script { jslBuildDocker([ - 'serviceName': env.appName + 'serviceName': env.appName, + 'dockerReg': 'secunicontainerregistry.azurecr.io' ]) } } @@ -230,7 +231,7 @@ pipeline { def stageConfig = jslReadYamlConfig('containerScan') def containerName = stageConfig?.containerName def containerTag = stageConfig?.containerTag - jslContainerSecurityScanning(containerName, containerTag) + jslContainerSecurityScanning(containerName, containerTag, 'secunicontainerregistry.azurecr.io') } } } From 4b6af0b1b7d45088ba5add56aeb392a83ec7ccdb Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 27 Feb 2024 20:22:24 -0800 Subject: [PATCH 022/197] Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml From 4f661bda918f5f87fa15062d7283bef491d2013e Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 27 Feb 2024 20:22:54 -0800 Subject: [PATCH 023/197] Release/0.1.0 beta/prod azure (#479) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml From cebffc6cb0dbc6f5a7ac0190cef8756506297c0b Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 27 Feb 2024 20:29:25 -0800 Subject: [PATCH 024/197] Update pipeline-config.yaml --- pipeline-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index daaeead8..55659e84 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -56,7 +56,7 @@ stages: dastTestType: full apiTargetUrl: 'http://192.168.0.68:5010/api/openapi.yaml' securityQualityGate: - enabled: false + enabled: true branches: - release deploy: From 8e01ce66cbaa0da69af90f118eb7fd61d3ff2714 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 27 Feb 2024 20:29:57 -0800 Subject: [PATCH 025/197] Release/0.1.0 beta/prod azure (#480) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml --- pipeline-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index daaeead8..55659e84 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -56,7 +56,7 @@ stages: dastTestType: full apiTargetUrl: 'http://192.168.0.68:5010/api/openapi.yaml' securityQualityGate: - enabled: false + enabled: true branches: - release deploy: From 38282ba86ef3bb91e0134a1b413c7deaf08864b0 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 27 Feb 2024 20:56:02 -0800 Subject: [PATCH 026/197] Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile --- Jenkinsfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 52b47457..281ac45d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -75,7 +75,7 @@ pipeline { stage('Secret Scanning') { agent { docker { - image 'securityuniversal/jenkins-secret-agent:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' } } when { @@ -99,7 +99,7 @@ pipeline { stage('Software Composition Analysis') { agent { docker { - image 'securityuniversal/jenkins:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' } } when { @@ -127,7 +127,7 @@ pipeline { stage('Static Application Security Testing') { agent { docker { - image 'securityuniversal/jenkins:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' } } when { @@ -155,7 +155,7 @@ pipeline { stage('Infrastructure-as-Code Security Testing') { agent { docker { - image 'securityuniversal/jenkins-iac-agent:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' args '--group-add 999' } } @@ -210,7 +210,7 @@ pipeline { stage('Docker Container Scanning') { agent { docker { - image 'securityuniversal/jenkins-iac-agent:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' args '--group-add 999' } } @@ -294,6 +294,12 @@ pipeline { ////////// Quality Gate ////////// stage("Quality Gate - Security") { + agent { + docker { + image 'securityuniversal/jenkins-sectesting-agent:latest' + args '--group-add 999' + } + } when { expression { def config = jslReadYamlConfig('securityQualityGate') From 4b3ba1f8fa8b2272dce8652855a48dd0347b85b9 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 27 Feb 2024 20:56:30 -0800 Subject: [PATCH 027/197] Release/0.1.0 beta/prod azure (#482) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile --- Jenkinsfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 52b47457..281ac45d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -75,7 +75,7 @@ pipeline { stage('Secret Scanning') { agent { docker { - image 'securityuniversal/jenkins-secret-agent:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' } } when { @@ -99,7 +99,7 @@ pipeline { stage('Software Composition Analysis') { agent { docker { - image 'securityuniversal/jenkins:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' } } when { @@ -127,7 +127,7 @@ pipeline { stage('Static Application Security Testing') { agent { docker { - image 'securityuniversal/jenkins:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' } } when { @@ -155,7 +155,7 @@ pipeline { stage('Infrastructure-as-Code Security Testing') { agent { docker { - image 'securityuniversal/jenkins-iac-agent:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' args '--group-add 999' } } @@ -210,7 +210,7 @@ pipeline { stage('Docker Container Scanning') { agent { docker { - image 'securityuniversal/jenkins-iac-agent:latest' + image 'securityuniversal/jenkins-sectesting-agent:latest' args '--group-add 999' } } @@ -294,6 +294,12 @@ pipeline { ////////// Quality Gate ////////// stage("Quality Gate - Security") { + agent { + docker { + image 'securityuniversal/jenkins-sectesting-agent:latest' + args '--group-add 999' + } + } when { expression { def config = jslReadYamlConfig('securityQualityGate') From 86da6a05ae9223d44dfc649d04c15c85b8599590 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 27 Feb 2024 22:07:02 -0800 Subject: [PATCH 028/197] Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing --- Jenkinsfile | 2 +- pipeline-config.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 281ac45d..a2d43df6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,7 +51,7 @@ pipeline { stage('Unit Testing') { agent { docker { - image 'securityuniversal/jenkins:latest' + image 'securityuniversal/jenkins-python-agent:latest' } } when { diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 55659e84..93ec1421 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -9,21 +9,21 @@ stages: branches: - release unitTesting: - enabled: false + enabled: true branches: [] secretScanning: enabled: true branches: - release sca: - enabled: false + enabled: true branches: - release codeLanguages: - Python - Javascript sast: - enabled: false + enabled: true branches: - release codeLanguages: @@ -37,19 +37,19 @@ stages: branches: - release containerScan: - enabled: false + enabled: true branches: - release containerName: secusphere containerTag: latest releaseToTest: - enabled: false + enabled: true branches: - release serviceName: secusphere containerTag: latest testRelease: - enabled: false + enabled: true branches: - release targetUrl: 'http://192.168.0.68:5010' From df33d2f84b39fce0ca3f37060628378895d8d1fb Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 27 Feb 2024 22:07:27 -0800 Subject: [PATCH 029/197] Release/0.1.0 beta/prod azure (#484) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing --- Jenkinsfile | 2 +- pipeline-config.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 281ac45d..a2d43df6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,7 +51,7 @@ pipeline { stage('Unit Testing') { agent { docker { - image 'securityuniversal/jenkins:latest' + image 'securityuniversal/jenkins-python-agent:latest' } } when { diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 55659e84..93ec1421 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -9,21 +9,21 @@ stages: branches: - release unitTesting: - enabled: false + enabled: true branches: [] secretScanning: enabled: true branches: - release sca: - enabled: false + enabled: true branches: - release codeLanguages: - Python - Javascript sast: - enabled: false + enabled: true branches: - release codeLanguages: @@ -37,19 +37,19 @@ stages: branches: - release containerScan: - enabled: false + enabled: true branches: - release containerName: secusphere containerTag: latest releaseToTest: - enabled: false + enabled: true branches: - release serviceName: secusphere containerTag: latest testRelease: - enabled: false + enabled: true branches: - release targetUrl: 'http://192.168.0.68:5010' From e019adeac8a7cd178f3b587652f3cc96a82dc81a Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 11:32:31 -0800 Subject: [PATCH 030/197] Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py --- src/vr/api/vulns/vulnerabilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vr/api/vulns/vulnerabilities.py b/src/vr/api/vulns/vulnerabilities.py index 7f0c000e..68360c8b 100644 --- a/src/vr/api/vulns/vulnerabilities.py +++ b/src/vr/api/vulns/vulnerabilities.py @@ -132,7 +132,7 @@ def update_vulnerabilities_status(app_cmdb_id, scan_id, req_raw): def add_vulns_background_process(req_raw): now = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S") app_name = req_raw['appName'] - git_url = req_raw['giturl'] + git_url = req_raw['gitUrl'] git_branch = req_raw['branch'] findings = req_raw['findings'] scan_type = req_raw['scanType'] From 53a54743dd8726742029cdcd9ef506347564c815 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 11:33:36 -0800 Subject: [PATCH 031/197] Release/0.1.0 beta/prod azure (#486) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py --- src/vr/api/vulns/vulnerabilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vr/api/vulns/vulnerabilities.py b/src/vr/api/vulns/vulnerabilities.py index 7f0c000e..68360c8b 100644 --- a/src/vr/api/vulns/vulnerabilities.py +++ b/src/vr/api/vulns/vulnerabilities.py @@ -132,7 +132,7 @@ def update_vulnerabilities_status(app_cmdb_id, scan_id, req_raw): def add_vulns_background_process(req_raw): now = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S") app_name = req_raw['appName'] - git_url = req_raw['giturl'] + git_url = req_raw['gitUrl'] git_branch = req_raw['branch'] findings = req_raw['findings'] scan_type = req_raw['scanType'] From 33e0b20eb87cf03926567167c608ed6dd6956960 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 13:57:17 -0800 Subject: [PATCH 032/197] Feature/jenkinsfile updates (#487) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml --- pipeline-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 93ec1421..60ce6fce 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -12,7 +12,7 @@ stages: enabled: true branches: [] secretScanning: - enabled: true + enabled: false branches: - release sca: @@ -29,7 +29,7 @@ stages: codeLanguages: - Python iac: - enabled: true + enabled: false branches: - release buildDocker: From 405448ac6954b0ca23e943fcaa2231294d203af7 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 13:57:39 -0800 Subject: [PATCH 033/197] Release/0.1.0 beta/prod azure (#488) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Feature/jenkinsfile updates (#487) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml --- pipeline-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 93ec1421..60ce6fce 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -12,7 +12,7 @@ stages: enabled: true branches: [] secretScanning: - enabled: true + enabled: false branches: - release sca: @@ -29,7 +29,7 @@ stages: codeLanguages: - Python iac: - enabled: true + enabled: false branches: - release buildDocker: From 509a6f102f692e5756090d5e76cb8bbefb64d606 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 14:41:24 -0800 Subject: [PATCH 034/197] Update pipeline-config.yaml --- pipeline-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 60ce6fce..2a9eb073 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -9,21 +9,21 @@ stages: branches: - release unitTesting: - enabled: true + enabled: false branches: [] secretScanning: enabled: false branches: - release sca: - enabled: true + enabled: false branches: - release codeLanguages: - Python - Javascript sast: - enabled: true + enabled: false branches: - release codeLanguages: @@ -37,26 +37,26 @@ stages: branches: - release containerScan: - enabled: true + enabled: false branches: - release containerName: secusphere containerTag: latest releaseToTest: - enabled: true + enabled: false branches: - release serviceName: secusphere containerTag: latest testRelease: - enabled: true + enabled: false branches: - release targetUrl: 'http://192.168.0.68:5010' dastTestType: full apiTargetUrl: 'http://192.168.0.68:5010/api/openapi.yaml' securityQualityGate: - enabled: true + enabled: false branches: - release deploy: From e819b231b1735330996a2140f0241a0d16c98745 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 14:41:59 -0800 Subject: [PATCH 035/197] Release/0.1.0 beta/prod azure (#489) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Feature/jenkinsfile updates (#487) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update pipeline-config.yaml From a52196c87a15f99d3970b7c5ea93adb8bbe09eba Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:29:24 -0800 Subject: [PATCH 036/197] Feature/jenkinsfile updates (#490) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update Jenkinsfile --- Jenkinsfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a2d43df6..8f818749 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -348,9 +348,7 @@ pipeline { 'secretsCredentials': stageConfig?.secretsCredentials, 'secretsSetStrings': stageConfig?.secretsSetStrings, 'serviceCredentials': stageConfig?.serviceCredentials, - 'serviceSetStrings': stageConfig?.serviceSetStrings, - 'dockerReg': 'secunicontainerregistry.azurecr.io', - 'imgPullSecret': 'acrCreds' + 'serviceSetStrings': stageConfig?.serviceSetStrings ]) } From 6273f97f5fc8ff0ac187ff4e307567e29d4eeca2 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:30:23 -0800 Subject: [PATCH 037/197] Release/0.1.0 beta/prod azure (#491) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Feature/jenkinsfile updates (#487) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#490) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update Jenkinsfile --- Jenkinsfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a2d43df6..8f818749 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -348,9 +348,7 @@ pipeline { 'secretsCredentials': stageConfig?.secretsCredentials, 'secretsSetStrings': stageConfig?.secretsSetStrings, 'serviceCredentials': stageConfig?.serviceCredentials, - 'serviceSetStrings': stageConfig?.serviceSetStrings, - 'dockerReg': 'secunicontainerregistry.azurecr.io', - 'imgPullSecret': 'acrCreds' + 'serviceSetStrings': stageConfig?.serviceSetStrings ]) } From 0f392046bbbd480c0b7936825fd51cb76cf7c4ee Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:37:20 -0800 Subject: [PATCH 038/197] Update pipeline-config.yaml --- pipeline-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 60ce6fce..2a9eb073 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -9,21 +9,21 @@ stages: branches: - release unitTesting: - enabled: true + enabled: false branches: [] secretScanning: enabled: false branches: - release sca: - enabled: true + enabled: false branches: - release codeLanguages: - Python - Javascript sast: - enabled: true + enabled: false branches: - release codeLanguages: @@ -37,26 +37,26 @@ stages: branches: - release containerScan: - enabled: true + enabled: false branches: - release containerName: secusphere containerTag: latest releaseToTest: - enabled: true + enabled: false branches: - release serviceName: secusphere containerTag: latest testRelease: - enabled: true + enabled: false branches: - release targetUrl: 'http://192.168.0.68:5010' dastTestType: full apiTargetUrl: 'http://192.168.0.68:5010/api/openapi.yaml' securityQualityGate: - enabled: true + enabled: false branches: - release deploy: From 140ad448c9d97ef7c1ebf84368163d7086386f0b Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:41:14 -0800 Subject: [PATCH 039/197] Release/0.1.0 beta/prod azure (#492) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Feature/jenkinsfile updates (#487) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#490) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update Jenkinsfile * Update pipeline-config.yaml --- pipeline-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pipeline-config.yaml b/pipeline-config.yaml index 60ce6fce..2a9eb073 100644 --- a/pipeline-config.yaml +++ b/pipeline-config.yaml @@ -9,21 +9,21 @@ stages: branches: - release unitTesting: - enabled: true + enabled: false branches: [] secretScanning: enabled: false branches: - release sca: - enabled: true + enabled: false branches: - release codeLanguages: - Python - Javascript sast: - enabled: true + enabled: false branches: - release codeLanguages: @@ -37,26 +37,26 @@ stages: branches: - release containerScan: - enabled: true + enabled: false branches: - release containerName: secusphere containerTag: latest releaseToTest: - enabled: true + enabled: false branches: - release serviceName: secusphere containerTag: latest testRelease: - enabled: true + enabled: false branches: - release targetUrl: 'http://192.168.0.68:5010' dastTestType: full apiTargetUrl: 'http://192.168.0.68:5010/api/openapi.yaml' securityQualityGate: - enabled: true + enabled: false branches: - release deploy: From ce79251e3f30ecfd7c3d00b5469ef4b7fbd64b5a Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 16:00:28 -0800 Subject: [PATCH 040/197] Update Jenkinsfile (#493) --- Jenkinsfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8f818749..bac83770 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -199,8 +199,7 @@ pipeline { jslStageWrapper('Build Docker Service') { script { jslBuildDocker([ - 'serviceName': env.appName, - 'dockerReg': 'secunicontainerregistry.azurecr.io' + 'serviceName': env.appName ]) } } @@ -231,7 +230,7 @@ pipeline { def stageConfig = jslReadYamlConfig('containerScan') def containerName = stageConfig?.containerName def containerTag = stageConfig?.containerTag - jslContainerSecurityScanning(containerName, containerTag, 'secunicontainerregistry.azurecr.io') + jslContainerSecurityScanning(containerName, containerTag) } } } From 7c2828ffa3aae746b054b661ac5ce5ddca51170b Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sat, 9 Mar 2024 16:00:58 -0800 Subject: [PATCH 041/197] Release/0.1.0 beta/prod azure (#494) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Feature/jenkinsfile updates (#487) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#490) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile (#493) --- Jenkinsfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8f818749..bac83770 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -199,8 +199,7 @@ pipeline { jslStageWrapper('Build Docker Service') { script { jslBuildDocker([ - 'serviceName': env.appName, - 'dockerReg': 'secunicontainerregistry.azurecr.io' + 'serviceName': env.appName ]) } } @@ -231,7 +230,7 @@ pipeline { def stageConfig = jslReadYamlConfig('containerScan') def containerName = stageConfig?.containerName def containerTag = stageConfig?.containerTag - jslContainerSecurityScanning(containerName, containerTag, 'secunicontainerregistry.azurecr.io') + jslContainerSecurityScanning(containerName, containerTag) } } } From 5fdd5b1eac66709c5fba401da314f608c1c67d21 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:45:36 -0700 Subject: [PATCH 042/197] Update security_quality_gate.py --- src/vr/api/vulns/security_quality_gate.py | 128 +++++++++++----------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/src/vr/api/vulns/security_quality_gate.py b/src/vr/api/vulns/security_quality_gate.py index 930c2a1b..b00c1b1e 100644 --- a/src/vr/api/vulns/security_quality_gate.py +++ b/src/vr/api/vulns/security_quality_gate.py @@ -51,38 +51,38 @@ def _add_sg_config_settings(config, job_id, app_id): job = SgConfigSettingsPerJob( AppID=app_id, PipelineJobID = job_id, - ThreshScaLow = config['thresholds']['sca']['low'], - ThreshScaMedium = config['thresholds']['sca']['medium'], - ThreshScaHigh = config['thresholds']['sca']['high'], - ThreshScaCritical = config['thresholds']['sca']['critical'], - ThreshContainerLow = config['thresholds']['container']['low'], - ThreshContainerMedium = config['thresholds']['container']['medium'], - ThreshContainerHigh = config['thresholds']['container']['high'], - ThreshContainerCritical = config['thresholds']['container']['critical'], - ThreshDastLow = config['thresholds']['dast']['low'], - ThreshDastMedium = config['thresholds']['dast']['medium'], - ThreshDastHigh = config['thresholds']['dast']['high'], - ThreshDastCritical = config['thresholds']['dast']['critical'], - ThreshDastApiLow = config['thresholds']['dastapi']['low'], - ThreshDastApiMedium = config['thresholds']['dastapi']['medium'], - ThreshDastApiHigh = config['thresholds']['dastapi']['high'], - ThreshDastApiCritical = config['thresholds']['dastapi']['critical'], - ThreshInfrastructureLow = config['thresholds']['infrastructure']['low'], - ThreshInfrastructureMedium = config['thresholds']['infrastructure']['medium'], - ThreshInfrastructureHigh = config['thresholds']['infrastructure']['high'], - ThreshInfrastructureCritical = config['thresholds']['infrastructure']['critical'], - ThreshSastLow = config['thresholds']['sast']['low'], - ThreshSastMedium = config['thresholds']['sast']['medium'], - ThreshSastHigh = config['thresholds']['sast']['high'], - ThreshSastCritical = config['thresholds']['sast']['critical'], - ThreshIacLow = config['thresholds']['iac']['low'], - ThreshIacMedium = config['thresholds']['iac']['medium'], - ThreshIacHigh = config['thresholds']['iac']['high'], - ThreshIacCritical = config['thresholds']['iac']['critical'], - ThreshSecretsLow = config['thresholds']['secret']['low'], - ThreshSecretsMedium = config['thresholds']['secret']['medium'], - ThreshSecretsHigh = config['thresholds']['secret']['high'], - ThreshSecretsCritical = config['thresholds']['secret']['critical'], + ThreshScaLow = config['sca']['low'], + ThreshScaMedium = config['sca']['medium'], + ThreshScaHigh = config['sca']['high'], + ThreshScaCritical = config['sca']['critical'], + ThreshContainerLow = config['container']['low'], + ThreshContainerMedium = config['container']['medium'], + ThreshContainerHigh = config['container']['high'], + ThreshContainerCritical = config['container']['critical'], + ThreshDastLow = config['dast']['low'], + ThreshDastMedium = config['dast']['medium'], + ThreshDastHigh = config['dast']['high'], + ThreshDastCritical = config['dast']['critical'], + ThreshDastApiLow = config['dastapi']['low'], + ThreshDastApiMedium = config['dastapi']['medium'], + ThreshDastApiHigh = config['dastapi']['high'], + ThreshDastApiCritical = config['dastapi']['critical'], + ThreshInfrastructureLow = config['infrastructure']['low'], + ThreshInfrastructureMedium = config['infrastructure']['medium'], + ThreshInfrastructureHigh = config['infrastructure']['high'], + ThreshInfrastructureCritical = config['infrastructure']['critical'], + ThreshSastLow = config['sast']['low'], + ThreshSastMedium = config['sast']['medium'], + ThreshSastHigh = config['sast']['high'], + ThreshSastCritical = config['sast']['critical'], + ThreshIacLow = config['iac']['low'], + ThreshIacMedium = config['iac']['medium'], + ThreshIacHigh = config['iac']['high'], + ThreshIacCritical = config['iac']['critical'], + ThreshSecretsLow = config['secret']['low'], + ThreshSecretsMedium = config['secret']['medium'], + ThreshSecretsHigh = config['secret']['high'], + ThreshSecretsCritical = config['secret']['critical'], ) db.session.add(job) db_connection_handler(db) @@ -92,38 +92,38 @@ def _add_sg_results(results, job_id, app_id): job = SgResultsPerJob( AppID=app_id, PipelineJobID=job_id, - ResultScaLow=results['report']['sca']['low'], - ResultScaMedium=results['report']['sca']['medium'], - ResultScaHigh=results['report']['sca']['high'], - ResultScaCritical=results['report']['sca']['critical'], - ResultContainerLow=results['report']['container']['low'], - ResultContainerMedium=results['report']['container']['medium'], - ResultContainerHigh=results['report']['container']['high'], - ResultContainerCritical=results['report']['container']['critical'], - ResultDastLow=results['report']['dast']['low'], - ResultDastMedium=results['report']['dast']['medium'], - ResultDastHigh=results['report']['dast']['high'], - ResultDastCritical=results['report']['dast']['critical'], - ResultDastApiLow=results['report']['dastapi']['low'], - ResultDastApiMedium=results['report']['dastapi']['medium'], - ResultDastApiHigh=results['report']['dastapi']['high'], - ResultDastApiCritical=results['report']['dastapi']['critical'], - ResultInfrastructureLow=results['report']['infrastructure']['low'], - ResultInfrastructureMedium=results['report']['infrastructure']['medium'], - ResultInfrastructureHigh=results['report']['infrastructure']['high'], - ResultInfrastructureCritical=results['report']['infrastructure']['critical'], - ResultSastLow=results['report']['sast']['low'], - ResultSastMedium=results['report']['sast']['medium'], - ResultSastHigh=results['report']['sast']['high'], - ResultSastCritical=results['report']['sast']['critical'], - ResultIacLow=results['report']['iac']['low'], - ResultIacMedium=results['report']['iac']['medium'], - ResultIacHigh=results['report']['iac']['high'], - ResultIacCritical=results['report']['iac']['critical'], - ResultSecretsLow=results['report']['secret']['low'], - ResultSecretsMedium=results['report']['secret']['medium'], - ResultSecretsHigh=results['report']['secret']['high'], - ResultSecretsCritical=results['report']['secret']['critical'], + ResultScaLow=results['sca']['low'], + ResultScaMedium=results['sca']['medium'], + ResultScaHigh=results['sca']['high'], + ResultScaCritical=results['sca']['critical'], + ResultContainerLow=results['container']['low'], + ResultContainerMedium=results['container']['medium'], + ResultContainerHigh=results['container']['high'], + ResultContainerCritical=results['container']['critical'], + ResultDastLow=results['dast']['low'], + ResultDastMedium=results['dast']['medium'], + ResultDastHigh=results['dast']['high'], + ResultDastCritical=results['dast']['critical'], + ResultDastApiLow=results['dastapi']['low'], + ResultDastApiMedium=results['dastapi']['medium'], + ResultDastApiHigh=results['dastapi']['high'], + ResultDastApiCritical=results['dastapi']['critical'], + ResultInfrastructureLow=results['infrastructure']['low'], + ResultInfrastructureMedium=results['infrastructure']['medium'], + ResultInfrastructureHigh=results['infrastructure']['high'], + ResultInfrastructureCritical=results['infrastructure']['critical'], + ResultSastLow=results['sast']['low'], + ResultSastMedium=results['sast']['medium'], + ResultSastHigh=results['sast']['high'], + ResultSastCritical=results['sast']['critical'], + ResultIacLow=results['iac']['low'], + ResultIacMedium=results['iac']['medium'], + ResultIacHigh=results['iac']['high'], + ResultIacCritical=results['iac']['critical'], + ResultSecretsLow=results['secret']['low'], + ResultSecretsMedium=results['secret']['medium'], + ResultSecretsHigh=results['secret']['high'], + ResultSecretsCritical=results['secret']['critical'], ) db.session.add(job) db_connection_handler(db) From 686ae51cac2c97ecaa9ee15b58d9cf7e43d82a76 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:51:17 -0700 Subject: [PATCH 043/197] Update security_quality_gate.py (#495) --- src/vr/api/vulns/security_quality_gate.py | 128 +++++++++++----------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/src/vr/api/vulns/security_quality_gate.py b/src/vr/api/vulns/security_quality_gate.py index 930c2a1b..b00c1b1e 100644 --- a/src/vr/api/vulns/security_quality_gate.py +++ b/src/vr/api/vulns/security_quality_gate.py @@ -51,38 +51,38 @@ def _add_sg_config_settings(config, job_id, app_id): job = SgConfigSettingsPerJob( AppID=app_id, PipelineJobID = job_id, - ThreshScaLow = config['thresholds']['sca']['low'], - ThreshScaMedium = config['thresholds']['sca']['medium'], - ThreshScaHigh = config['thresholds']['sca']['high'], - ThreshScaCritical = config['thresholds']['sca']['critical'], - ThreshContainerLow = config['thresholds']['container']['low'], - ThreshContainerMedium = config['thresholds']['container']['medium'], - ThreshContainerHigh = config['thresholds']['container']['high'], - ThreshContainerCritical = config['thresholds']['container']['critical'], - ThreshDastLow = config['thresholds']['dast']['low'], - ThreshDastMedium = config['thresholds']['dast']['medium'], - ThreshDastHigh = config['thresholds']['dast']['high'], - ThreshDastCritical = config['thresholds']['dast']['critical'], - ThreshDastApiLow = config['thresholds']['dastapi']['low'], - ThreshDastApiMedium = config['thresholds']['dastapi']['medium'], - ThreshDastApiHigh = config['thresholds']['dastapi']['high'], - ThreshDastApiCritical = config['thresholds']['dastapi']['critical'], - ThreshInfrastructureLow = config['thresholds']['infrastructure']['low'], - ThreshInfrastructureMedium = config['thresholds']['infrastructure']['medium'], - ThreshInfrastructureHigh = config['thresholds']['infrastructure']['high'], - ThreshInfrastructureCritical = config['thresholds']['infrastructure']['critical'], - ThreshSastLow = config['thresholds']['sast']['low'], - ThreshSastMedium = config['thresholds']['sast']['medium'], - ThreshSastHigh = config['thresholds']['sast']['high'], - ThreshSastCritical = config['thresholds']['sast']['critical'], - ThreshIacLow = config['thresholds']['iac']['low'], - ThreshIacMedium = config['thresholds']['iac']['medium'], - ThreshIacHigh = config['thresholds']['iac']['high'], - ThreshIacCritical = config['thresholds']['iac']['critical'], - ThreshSecretsLow = config['thresholds']['secret']['low'], - ThreshSecretsMedium = config['thresholds']['secret']['medium'], - ThreshSecretsHigh = config['thresholds']['secret']['high'], - ThreshSecretsCritical = config['thresholds']['secret']['critical'], + ThreshScaLow = config['sca']['low'], + ThreshScaMedium = config['sca']['medium'], + ThreshScaHigh = config['sca']['high'], + ThreshScaCritical = config['sca']['critical'], + ThreshContainerLow = config['container']['low'], + ThreshContainerMedium = config['container']['medium'], + ThreshContainerHigh = config['container']['high'], + ThreshContainerCritical = config['container']['critical'], + ThreshDastLow = config['dast']['low'], + ThreshDastMedium = config['dast']['medium'], + ThreshDastHigh = config['dast']['high'], + ThreshDastCritical = config['dast']['critical'], + ThreshDastApiLow = config['dastapi']['low'], + ThreshDastApiMedium = config['dastapi']['medium'], + ThreshDastApiHigh = config['dastapi']['high'], + ThreshDastApiCritical = config['dastapi']['critical'], + ThreshInfrastructureLow = config['infrastructure']['low'], + ThreshInfrastructureMedium = config['infrastructure']['medium'], + ThreshInfrastructureHigh = config['infrastructure']['high'], + ThreshInfrastructureCritical = config['infrastructure']['critical'], + ThreshSastLow = config['sast']['low'], + ThreshSastMedium = config['sast']['medium'], + ThreshSastHigh = config['sast']['high'], + ThreshSastCritical = config['sast']['critical'], + ThreshIacLow = config['iac']['low'], + ThreshIacMedium = config['iac']['medium'], + ThreshIacHigh = config['iac']['high'], + ThreshIacCritical = config['iac']['critical'], + ThreshSecretsLow = config['secret']['low'], + ThreshSecretsMedium = config['secret']['medium'], + ThreshSecretsHigh = config['secret']['high'], + ThreshSecretsCritical = config['secret']['critical'], ) db.session.add(job) db_connection_handler(db) @@ -92,38 +92,38 @@ def _add_sg_results(results, job_id, app_id): job = SgResultsPerJob( AppID=app_id, PipelineJobID=job_id, - ResultScaLow=results['report']['sca']['low'], - ResultScaMedium=results['report']['sca']['medium'], - ResultScaHigh=results['report']['sca']['high'], - ResultScaCritical=results['report']['sca']['critical'], - ResultContainerLow=results['report']['container']['low'], - ResultContainerMedium=results['report']['container']['medium'], - ResultContainerHigh=results['report']['container']['high'], - ResultContainerCritical=results['report']['container']['critical'], - ResultDastLow=results['report']['dast']['low'], - ResultDastMedium=results['report']['dast']['medium'], - ResultDastHigh=results['report']['dast']['high'], - ResultDastCritical=results['report']['dast']['critical'], - ResultDastApiLow=results['report']['dastapi']['low'], - ResultDastApiMedium=results['report']['dastapi']['medium'], - ResultDastApiHigh=results['report']['dastapi']['high'], - ResultDastApiCritical=results['report']['dastapi']['critical'], - ResultInfrastructureLow=results['report']['infrastructure']['low'], - ResultInfrastructureMedium=results['report']['infrastructure']['medium'], - ResultInfrastructureHigh=results['report']['infrastructure']['high'], - ResultInfrastructureCritical=results['report']['infrastructure']['critical'], - ResultSastLow=results['report']['sast']['low'], - ResultSastMedium=results['report']['sast']['medium'], - ResultSastHigh=results['report']['sast']['high'], - ResultSastCritical=results['report']['sast']['critical'], - ResultIacLow=results['report']['iac']['low'], - ResultIacMedium=results['report']['iac']['medium'], - ResultIacHigh=results['report']['iac']['high'], - ResultIacCritical=results['report']['iac']['critical'], - ResultSecretsLow=results['report']['secret']['low'], - ResultSecretsMedium=results['report']['secret']['medium'], - ResultSecretsHigh=results['report']['secret']['high'], - ResultSecretsCritical=results['report']['secret']['critical'], + ResultScaLow=results['sca']['low'], + ResultScaMedium=results['sca']['medium'], + ResultScaHigh=results['sca']['high'], + ResultScaCritical=results['sca']['critical'], + ResultContainerLow=results['container']['low'], + ResultContainerMedium=results['container']['medium'], + ResultContainerHigh=results['container']['high'], + ResultContainerCritical=results['container']['critical'], + ResultDastLow=results['dast']['low'], + ResultDastMedium=results['dast']['medium'], + ResultDastHigh=results['dast']['high'], + ResultDastCritical=results['dast']['critical'], + ResultDastApiLow=results['dastapi']['low'], + ResultDastApiMedium=results['dastapi']['medium'], + ResultDastApiHigh=results['dastapi']['high'], + ResultDastApiCritical=results['dastapi']['critical'], + ResultInfrastructureLow=results['infrastructure']['low'], + ResultInfrastructureMedium=results['infrastructure']['medium'], + ResultInfrastructureHigh=results['infrastructure']['high'], + ResultInfrastructureCritical=results['infrastructure']['critical'], + ResultSastLow=results['sast']['low'], + ResultSastMedium=results['sast']['medium'], + ResultSastHigh=results['sast']['high'], + ResultSastCritical=results['sast']['critical'], + ResultIacLow=results['iac']['low'], + ResultIacMedium=results['iac']['medium'], + ResultIacHigh=results['iac']['high'], + ResultIacCritical=results['iac']['critical'], + ResultSecretsLow=results['secret']['low'], + ResultSecretsMedium=results['secret']['medium'], + ResultSecretsHigh=results['secret']['high'], + ResultSecretsCritical=results['secret']['critical'], ) db.session.add(job) db_connection_handler(db) From 99609d73b9a7b48fa69de8101d914ef1c3ce56c1 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:51:44 -0700 Subject: [PATCH 044/197] Release/0.1.0 beta/prod azure (#496) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Feature/jenkinsfile updates (#487) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#490) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile (#493) * Update security_quality_gate.py (#495) --- src/vr/api/vulns/security_quality_gate.py | 128 +++++++++++----------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/src/vr/api/vulns/security_quality_gate.py b/src/vr/api/vulns/security_quality_gate.py index 930c2a1b..b00c1b1e 100644 --- a/src/vr/api/vulns/security_quality_gate.py +++ b/src/vr/api/vulns/security_quality_gate.py @@ -51,38 +51,38 @@ def _add_sg_config_settings(config, job_id, app_id): job = SgConfigSettingsPerJob( AppID=app_id, PipelineJobID = job_id, - ThreshScaLow = config['thresholds']['sca']['low'], - ThreshScaMedium = config['thresholds']['sca']['medium'], - ThreshScaHigh = config['thresholds']['sca']['high'], - ThreshScaCritical = config['thresholds']['sca']['critical'], - ThreshContainerLow = config['thresholds']['container']['low'], - ThreshContainerMedium = config['thresholds']['container']['medium'], - ThreshContainerHigh = config['thresholds']['container']['high'], - ThreshContainerCritical = config['thresholds']['container']['critical'], - ThreshDastLow = config['thresholds']['dast']['low'], - ThreshDastMedium = config['thresholds']['dast']['medium'], - ThreshDastHigh = config['thresholds']['dast']['high'], - ThreshDastCritical = config['thresholds']['dast']['critical'], - ThreshDastApiLow = config['thresholds']['dastapi']['low'], - ThreshDastApiMedium = config['thresholds']['dastapi']['medium'], - ThreshDastApiHigh = config['thresholds']['dastapi']['high'], - ThreshDastApiCritical = config['thresholds']['dastapi']['critical'], - ThreshInfrastructureLow = config['thresholds']['infrastructure']['low'], - ThreshInfrastructureMedium = config['thresholds']['infrastructure']['medium'], - ThreshInfrastructureHigh = config['thresholds']['infrastructure']['high'], - ThreshInfrastructureCritical = config['thresholds']['infrastructure']['critical'], - ThreshSastLow = config['thresholds']['sast']['low'], - ThreshSastMedium = config['thresholds']['sast']['medium'], - ThreshSastHigh = config['thresholds']['sast']['high'], - ThreshSastCritical = config['thresholds']['sast']['critical'], - ThreshIacLow = config['thresholds']['iac']['low'], - ThreshIacMedium = config['thresholds']['iac']['medium'], - ThreshIacHigh = config['thresholds']['iac']['high'], - ThreshIacCritical = config['thresholds']['iac']['critical'], - ThreshSecretsLow = config['thresholds']['secret']['low'], - ThreshSecretsMedium = config['thresholds']['secret']['medium'], - ThreshSecretsHigh = config['thresholds']['secret']['high'], - ThreshSecretsCritical = config['thresholds']['secret']['critical'], + ThreshScaLow = config['sca']['low'], + ThreshScaMedium = config['sca']['medium'], + ThreshScaHigh = config['sca']['high'], + ThreshScaCritical = config['sca']['critical'], + ThreshContainerLow = config['container']['low'], + ThreshContainerMedium = config['container']['medium'], + ThreshContainerHigh = config['container']['high'], + ThreshContainerCritical = config['container']['critical'], + ThreshDastLow = config['dast']['low'], + ThreshDastMedium = config['dast']['medium'], + ThreshDastHigh = config['dast']['high'], + ThreshDastCritical = config['dast']['critical'], + ThreshDastApiLow = config['dastapi']['low'], + ThreshDastApiMedium = config['dastapi']['medium'], + ThreshDastApiHigh = config['dastapi']['high'], + ThreshDastApiCritical = config['dastapi']['critical'], + ThreshInfrastructureLow = config['infrastructure']['low'], + ThreshInfrastructureMedium = config['infrastructure']['medium'], + ThreshInfrastructureHigh = config['infrastructure']['high'], + ThreshInfrastructureCritical = config['infrastructure']['critical'], + ThreshSastLow = config['sast']['low'], + ThreshSastMedium = config['sast']['medium'], + ThreshSastHigh = config['sast']['high'], + ThreshSastCritical = config['sast']['critical'], + ThreshIacLow = config['iac']['low'], + ThreshIacMedium = config['iac']['medium'], + ThreshIacHigh = config['iac']['high'], + ThreshIacCritical = config['iac']['critical'], + ThreshSecretsLow = config['secret']['low'], + ThreshSecretsMedium = config['secret']['medium'], + ThreshSecretsHigh = config['secret']['high'], + ThreshSecretsCritical = config['secret']['critical'], ) db.session.add(job) db_connection_handler(db) @@ -92,38 +92,38 @@ def _add_sg_results(results, job_id, app_id): job = SgResultsPerJob( AppID=app_id, PipelineJobID=job_id, - ResultScaLow=results['report']['sca']['low'], - ResultScaMedium=results['report']['sca']['medium'], - ResultScaHigh=results['report']['sca']['high'], - ResultScaCritical=results['report']['sca']['critical'], - ResultContainerLow=results['report']['container']['low'], - ResultContainerMedium=results['report']['container']['medium'], - ResultContainerHigh=results['report']['container']['high'], - ResultContainerCritical=results['report']['container']['critical'], - ResultDastLow=results['report']['dast']['low'], - ResultDastMedium=results['report']['dast']['medium'], - ResultDastHigh=results['report']['dast']['high'], - ResultDastCritical=results['report']['dast']['critical'], - ResultDastApiLow=results['report']['dastapi']['low'], - ResultDastApiMedium=results['report']['dastapi']['medium'], - ResultDastApiHigh=results['report']['dastapi']['high'], - ResultDastApiCritical=results['report']['dastapi']['critical'], - ResultInfrastructureLow=results['report']['infrastructure']['low'], - ResultInfrastructureMedium=results['report']['infrastructure']['medium'], - ResultInfrastructureHigh=results['report']['infrastructure']['high'], - ResultInfrastructureCritical=results['report']['infrastructure']['critical'], - ResultSastLow=results['report']['sast']['low'], - ResultSastMedium=results['report']['sast']['medium'], - ResultSastHigh=results['report']['sast']['high'], - ResultSastCritical=results['report']['sast']['critical'], - ResultIacLow=results['report']['iac']['low'], - ResultIacMedium=results['report']['iac']['medium'], - ResultIacHigh=results['report']['iac']['high'], - ResultIacCritical=results['report']['iac']['critical'], - ResultSecretsLow=results['report']['secret']['low'], - ResultSecretsMedium=results['report']['secret']['medium'], - ResultSecretsHigh=results['report']['secret']['high'], - ResultSecretsCritical=results['report']['secret']['critical'], + ResultScaLow=results['sca']['low'], + ResultScaMedium=results['sca']['medium'], + ResultScaHigh=results['sca']['high'], + ResultScaCritical=results['sca']['critical'], + ResultContainerLow=results['container']['low'], + ResultContainerMedium=results['container']['medium'], + ResultContainerHigh=results['container']['high'], + ResultContainerCritical=results['container']['critical'], + ResultDastLow=results['dast']['low'], + ResultDastMedium=results['dast']['medium'], + ResultDastHigh=results['dast']['high'], + ResultDastCritical=results['dast']['critical'], + ResultDastApiLow=results['dastapi']['low'], + ResultDastApiMedium=results['dastapi']['medium'], + ResultDastApiHigh=results['dastapi']['high'], + ResultDastApiCritical=results['dastapi']['critical'], + ResultInfrastructureLow=results['infrastructure']['low'], + ResultInfrastructureMedium=results['infrastructure']['medium'], + ResultInfrastructureHigh=results['infrastructure']['high'], + ResultInfrastructureCritical=results['infrastructure']['critical'], + ResultSastLow=results['sast']['low'], + ResultSastMedium=results['sast']['medium'], + ResultSastHigh=results['sast']['high'], + ResultSastCritical=results['sast']['critical'], + ResultIacLow=results['iac']['low'], + ResultIacMedium=results['iac']['medium'], + ResultIacHigh=results['iac']['high'], + ResultIacCritical=results['iac']['critical'], + ResultSecretsLow=results['secret']['low'], + ResultSecretsMedium=results['secret']['medium'], + ResultSecretsHigh=results['secret']['high'], + ResultSecretsCritical=results['secret']['critical'], ) db.session.add(job) db_connection_handler(db) From 1a5e69ee64ab912c8ef32fd599938bac3dd7ef7e Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 12 Mar 2024 19:34:30 -0700 Subject: [PATCH 045/197] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bac83770..f45ebce2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { env.GLOBAL_BRANCH_LIST = config.global.defaultBranches.join(',') env.CURRENT_STAGE_BRANCH_LIST = "" - jslStageWrapper.initReport() + jslStageWrapper.initReport(config) } } From b4c8b1d574803b54f8e9552d0ebbd904d03b1f90 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 12 Mar 2024 19:40:15 -0700 Subject: [PATCH 046/197] Feature/update jenkins config (#497) * Update security_quality_gate.py * Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bac83770..f45ebce2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { env.GLOBAL_BRANCH_LIST = config.global.defaultBranches.join(',') env.CURRENT_STAGE_BRANCH_LIST = "" - jslStageWrapper.initReport() + jslStageWrapper.initReport(config) } } From 067b847173c3ac49e991c7b30de6fa9373f3588a Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 12 Mar 2024 19:41:08 -0700 Subject: [PATCH 047/197] Release/0.1.0 beta/prod azure (#498) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Feature/jenkinsfile updates (#487) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#490) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile (#493) * Update security_quality_gate.py (#495) * Feature/update jenkins config (#497) * Update security_quality_gate.py * Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bac83770..f45ebce2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { env.GLOBAL_BRANCH_LIST = config.global.defaultBranches.join(',') env.CURRENT_STAGE_BRANCH_LIST = "" - jslStageWrapper.initReport() + jslStageWrapper.initReport(config) } } From 12cbbd2e263570bd76cfae4692eac374d6c432c1 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:16:37 -0700 Subject: [PATCH 048/197] Update security_quality_gate.py --- src/vr/api/vulns/security_quality_gate.py | 64 +++++++++++------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/vr/api/vulns/security_quality_gate.py b/src/vr/api/vulns/security_quality_gate.py index b00c1b1e..29c4191a 100644 --- a/src/vr/api/vulns/security_quality_gate.py +++ b/src/vr/api/vulns/security_quality_gate.py @@ -51,38 +51,38 @@ def _add_sg_config_settings(config, job_id, app_id): job = SgConfigSettingsPerJob( AppID=app_id, PipelineJobID = job_id, - ThreshScaLow = config['sca']['low'], - ThreshScaMedium = config['sca']['medium'], - ThreshScaHigh = config['sca']['high'], - ThreshScaCritical = config['sca']['critical'], - ThreshContainerLow = config['container']['low'], - ThreshContainerMedium = config['container']['medium'], - ThreshContainerHigh = config['container']['high'], - ThreshContainerCritical = config['container']['critical'], - ThreshDastLow = config['dast']['low'], - ThreshDastMedium = config['dast']['medium'], - ThreshDastHigh = config['dast']['high'], - ThreshDastCritical = config['dast']['critical'], - ThreshDastApiLow = config['dastapi']['low'], - ThreshDastApiMedium = config['dastapi']['medium'], - ThreshDastApiHigh = config['dastapi']['high'], - ThreshDastApiCritical = config['dastapi']['critical'], - ThreshInfrastructureLow = config['infrastructure']['low'], - ThreshInfrastructureMedium = config['infrastructure']['medium'], - ThreshInfrastructureHigh = config['infrastructure']['high'], - ThreshInfrastructureCritical = config['infrastructure']['critical'], - ThreshSastLow = config['sast']['low'], - ThreshSastMedium = config['sast']['medium'], - ThreshSastHigh = config['sast']['high'], - ThreshSastCritical = config['sast']['critical'], - ThreshIacLow = config['iac']['low'], - ThreshIacMedium = config['iac']['medium'], - ThreshIacHigh = config['iac']['high'], - ThreshIacCritical = config['iac']['critical'], - ThreshSecretsLow = config['secret']['low'], - ThreshSecretsMedium = config['secret']['medium'], - ThreshSecretsHigh = config['secret']['high'], - ThreshSecretsCritical = config['secret']['critical'], + ThreshScaLow = config['sca']['low'] if 'low' in 'sca' else '', + ThreshScaMedium = config['sca']['medium'] if 'medium' in 'sca' else '', + ThreshScaHigh = config['sca']['high'] if 'high' in 'sca' else '', + ThreshScaCritical = config['sca']['critical'] if 'critical' in 'sca' else '', + ThreshContainerLow = config['container']['low'] if 'low' in 'container' else '', + ThreshContainerMedium = config['container']['medium'] if 'medium' in 'container' else '', + ThreshContainerHigh = config['container']['high'] if 'high' in 'container' else '', + ThreshContainerCritical = config['container']['critical'] if 'critical' in 'container' else '', + ThreshDastLow = config['dast']['low'] if 'low' in 'dast' else '', + ThreshDastMedium = config['dast']['medium'] if 'medium' in 'dast' else '', + ThreshDastHigh = config['dast']['high'] if 'high' in 'dast' else '', + ThreshDastCritical = config['dast']['critical'] if 'critical' in 'dast' else '', + ThreshDastApiLow = config['dastapi']['low'] if 'low' in 'dastapi' else '', + ThreshDastApiMedium = config['dastapi']['medium'] if 'medium' in 'dastapi' else '', + ThreshDastApiHigh = config['dastapi']['high'] if 'high' in 'dastapi' else '', + ThreshDastApiCritical = config['dastapi']['critical'] if 'critical' in 'dastapi' else '', + ThreshInfrastructureLow = config['infrastructure']['low'] if 'low' in 'infrastructure' else '', + ThreshInfrastructureMedium = config['infrastructure']['medium'] if 'medium' in 'infrastructure' else '', + ThreshInfrastructureHigh = config['infrastructure']['high'] if 'high' in 'infrastructure' else '', + ThreshInfrastructureCritical = config['infrastructure']['critical'] if 'critical' in 'infrastructure' else '', + ThreshSastLow = config['sast']['low'] if 'low' in 'sast' else '', + ThreshSastMedium = config['sast']['medium'] if 'medium' in 'sast' else '', + ThreshSastHigh = config['sast']['high'] if 'high' in 'sast' else '', + ThreshSastCritical = config['sast']['critical'] if 'critical' in 'sast' else '', + ThreshIacLow = config['iac']['low'] if 'low' in 'iac' else '', + ThreshIacMedium = config['iac']['medium'] if 'medium' in 'iac' else '', + ThreshIacHigh = config['iac']['high'] if 'high' in 'iac' else '', + ThreshIacCritical = config['iac']['critical'] if 'critical' in 'iac' else '', + ThreshSecretsLow = config['secret']['low'] if 'low' in 'secret' else '', + ThreshSecretsMedium = config['secret']['medium'] if 'medium' in 'secret' else '', + ThreshSecretsHigh = config['secret']['high'] if 'high' in 'secret' else '', + ThreshSecretsCritical = config['secret']['critical'] if 'critical' in 'secret' else '', ) db.session.add(job) db_connection_handler(db) From 0cc02a42eb089f33dc0e9eca4dd22031771a7b4d Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:22:58 -0700 Subject: [PATCH 049/197] Feature/update security gate config (#499) * Update security_quality_gate.py * Update Jenkinsfile * Update security_quality_gate.py --- src/vr/api/vulns/security_quality_gate.py | 64 +++++++++++------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/vr/api/vulns/security_quality_gate.py b/src/vr/api/vulns/security_quality_gate.py index b00c1b1e..29c4191a 100644 --- a/src/vr/api/vulns/security_quality_gate.py +++ b/src/vr/api/vulns/security_quality_gate.py @@ -51,38 +51,38 @@ def _add_sg_config_settings(config, job_id, app_id): job = SgConfigSettingsPerJob( AppID=app_id, PipelineJobID = job_id, - ThreshScaLow = config['sca']['low'], - ThreshScaMedium = config['sca']['medium'], - ThreshScaHigh = config['sca']['high'], - ThreshScaCritical = config['sca']['critical'], - ThreshContainerLow = config['container']['low'], - ThreshContainerMedium = config['container']['medium'], - ThreshContainerHigh = config['container']['high'], - ThreshContainerCritical = config['container']['critical'], - ThreshDastLow = config['dast']['low'], - ThreshDastMedium = config['dast']['medium'], - ThreshDastHigh = config['dast']['high'], - ThreshDastCritical = config['dast']['critical'], - ThreshDastApiLow = config['dastapi']['low'], - ThreshDastApiMedium = config['dastapi']['medium'], - ThreshDastApiHigh = config['dastapi']['high'], - ThreshDastApiCritical = config['dastapi']['critical'], - ThreshInfrastructureLow = config['infrastructure']['low'], - ThreshInfrastructureMedium = config['infrastructure']['medium'], - ThreshInfrastructureHigh = config['infrastructure']['high'], - ThreshInfrastructureCritical = config['infrastructure']['critical'], - ThreshSastLow = config['sast']['low'], - ThreshSastMedium = config['sast']['medium'], - ThreshSastHigh = config['sast']['high'], - ThreshSastCritical = config['sast']['critical'], - ThreshIacLow = config['iac']['low'], - ThreshIacMedium = config['iac']['medium'], - ThreshIacHigh = config['iac']['high'], - ThreshIacCritical = config['iac']['critical'], - ThreshSecretsLow = config['secret']['low'], - ThreshSecretsMedium = config['secret']['medium'], - ThreshSecretsHigh = config['secret']['high'], - ThreshSecretsCritical = config['secret']['critical'], + ThreshScaLow = config['sca']['low'] if 'low' in 'sca' else '', + ThreshScaMedium = config['sca']['medium'] if 'medium' in 'sca' else '', + ThreshScaHigh = config['sca']['high'] if 'high' in 'sca' else '', + ThreshScaCritical = config['sca']['critical'] if 'critical' in 'sca' else '', + ThreshContainerLow = config['container']['low'] if 'low' in 'container' else '', + ThreshContainerMedium = config['container']['medium'] if 'medium' in 'container' else '', + ThreshContainerHigh = config['container']['high'] if 'high' in 'container' else '', + ThreshContainerCritical = config['container']['critical'] if 'critical' in 'container' else '', + ThreshDastLow = config['dast']['low'] if 'low' in 'dast' else '', + ThreshDastMedium = config['dast']['medium'] if 'medium' in 'dast' else '', + ThreshDastHigh = config['dast']['high'] if 'high' in 'dast' else '', + ThreshDastCritical = config['dast']['critical'] if 'critical' in 'dast' else '', + ThreshDastApiLow = config['dastapi']['low'] if 'low' in 'dastapi' else '', + ThreshDastApiMedium = config['dastapi']['medium'] if 'medium' in 'dastapi' else '', + ThreshDastApiHigh = config['dastapi']['high'] if 'high' in 'dastapi' else '', + ThreshDastApiCritical = config['dastapi']['critical'] if 'critical' in 'dastapi' else '', + ThreshInfrastructureLow = config['infrastructure']['low'] if 'low' in 'infrastructure' else '', + ThreshInfrastructureMedium = config['infrastructure']['medium'] if 'medium' in 'infrastructure' else '', + ThreshInfrastructureHigh = config['infrastructure']['high'] if 'high' in 'infrastructure' else '', + ThreshInfrastructureCritical = config['infrastructure']['critical'] if 'critical' in 'infrastructure' else '', + ThreshSastLow = config['sast']['low'] if 'low' in 'sast' else '', + ThreshSastMedium = config['sast']['medium'] if 'medium' in 'sast' else '', + ThreshSastHigh = config['sast']['high'] if 'high' in 'sast' else '', + ThreshSastCritical = config['sast']['critical'] if 'critical' in 'sast' else '', + ThreshIacLow = config['iac']['low'] if 'low' in 'iac' else '', + ThreshIacMedium = config['iac']['medium'] if 'medium' in 'iac' else '', + ThreshIacHigh = config['iac']['high'] if 'high' in 'iac' else '', + ThreshIacCritical = config['iac']['critical'] if 'critical' in 'iac' else '', + ThreshSecretsLow = config['secret']['low'] if 'low' in 'secret' else '', + ThreshSecretsMedium = config['secret']['medium'] if 'medium' in 'secret' else '', + ThreshSecretsHigh = config['secret']['high'] if 'high' in 'secret' else '', + ThreshSecretsCritical = config['secret']['critical'] if 'critical' in 'secret' else '', ) db.session.add(job) db_connection_handler(db) From 016fe0da82ff79136bd0d73240139196e5d6936a Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:24:01 -0700 Subject: [PATCH 050/197] Release/0.1.0 beta/prod azure (#500) * Update pipeline-config.yaml (#440) * Update tox.ini (#441) * Feature/fix toxi (#443) * Update tox.ini * fix unit test failures * Feature/fix toxi (#445) * Update tox.ini * fix unit test failures * Update web_testing.py * Feature/fix toxi (#447) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * Feature/fix toxi (#449) * Update tox.ini * fix unit test failures * Update web_testing.py * Update Jenkinsfile * add dockerImg map for Container scans * Update Jenkinsfile (#452) * Feature/jenkinsfile updates (#453) * Update Jenkinsfile * added scores and grades api endpoint * Feature/jenkinsfile updates (#455) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Feature/jenkinsfile updates (#457) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Feature/jenkinsfile updates (#459) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Feature/jenkinsfile updates (#461) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#463) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#465) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#467) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Feature/jenkinsfile updates (#469) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * Update Jenkinsfile * Update pipeline-config.yaml * Update values.yaml * Update values.yaml * Update Jenkinsfile * Update values.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#473) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * Feature/jenkinsfile updates (#474) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Feature/jenkinsfile updates (#476) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Feature/jenkinsfile updates (#478) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#481) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * Feature/jenkinsfile updates (#483) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Feature/jenkinsfile updates (#485) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Feature/jenkinsfile updates (#487) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update pipeline-config.yaml * Feature/jenkinsfile updates (#490) * Update Jenkinsfile * added scores and grades api endpoint * Update Jenkinsfile * Update Jenkinsfile * Update pipeline-config.yaml * Update pipeline-config.yaml * Update pipeline-config.yaml * Update Jenkinsfile * Update sgglobalthresholds.py * Update initial_setup.py * add conditions for jenkins and snow integrations * add settings for Jenkins * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile * jenkins testing * Update vulnerabilities.py * Update pipeline-config.yaml * Update Jenkinsfile * Update pipeline-config.yaml * Update Jenkinsfile (#493) * Update security_quality_gate.py (#495) * Feature/update jenkins config (#497) * Update security_quality_gate.py * Update Jenkinsfile * Feature/update security gate config (#499) * Update security_quality_gate.py * Update Jenkinsfile * Update security_quality_gate.py --- src/vr/api/vulns/security_quality_gate.py | 64 +++++++++++------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/vr/api/vulns/security_quality_gate.py b/src/vr/api/vulns/security_quality_gate.py index b00c1b1e..29c4191a 100644 --- a/src/vr/api/vulns/security_quality_gate.py +++ b/src/vr/api/vulns/security_quality_gate.py @@ -51,38 +51,38 @@ def _add_sg_config_settings(config, job_id, app_id): job = SgConfigSettingsPerJob( AppID=app_id, PipelineJobID = job_id, - ThreshScaLow = config['sca']['low'], - ThreshScaMedium = config['sca']['medium'], - ThreshScaHigh = config['sca']['high'], - ThreshScaCritical = config['sca']['critical'], - ThreshContainerLow = config['container']['low'], - ThreshContainerMedium = config['container']['medium'], - ThreshContainerHigh = config['container']['high'], - ThreshContainerCritical = config['container']['critical'], - ThreshDastLow = config['dast']['low'], - ThreshDastMedium = config['dast']['medium'], - ThreshDastHigh = config['dast']['high'], - ThreshDastCritical = config['dast']['critical'], - ThreshDastApiLow = config['dastapi']['low'], - ThreshDastApiMedium = config['dastapi']['medium'], - ThreshDastApiHigh = config['dastapi']['high'], - ThreshDastApiCritical = config['dastapi']['critical'], - ThreshInfrastructureLow = config['infrastructure']['low'], - ThreshInfrastructureMedium = config['infrastructure']['medium'], - ThreshInfrastructureHigh = config['infrastructure']['high'], - ThreshInfrastructureCritical = config['infrastructure']['critical'], - ThreshSastLow = config['sast']['low'], - ThreshSastMedium = config['sast']['medium'], - ThreshSastHigh = config['sast']['high'], - ThreshSastCritical = config['sast']['critical'], - ThreshIacLow = config['iac']['low'], - ThreshIacMedium = config['iac']['medium'], - ThreshIacHigh = config['iac']['high'], - ThreshIacCritical = config['iac']['critical'], - ThreshSecretsLow = config['secret']['low'], - ThreshSecretsMedium = config['secret']['medium'], - ThreshSecretsHigh = config['secret']['high'], - ThreshSecretsCritical = config['secret']['critical'], + ThreshScaLow = config['sca']['low'] if 'low' in 'sca' else '', + ThreshScaMedium = config['sca']['medium'] if 'medium' in 'sca' else '', + ThreshScaHigh = config['sca']['high'] if 'high' in 'sca' else '', + ThreshScaCritical = config['sca']['critical'] if 'critical' in 'sca' else '', + ThreshContainerLow = config['container']['low'] if 'low' in 'container' else '', + ThreshContainerMedium = config['container']['medium'] if 'medium' in 'container' else '', + ThreshContainerHigh = config['container']['high'] if 'high' in 'container' else '', + ThreshContainerCritical = config['container']['critical'] if 'critical' in 'container' else '', + ThreshDastLow = config['dast']['low'] if 'low' in 'dast' else '', + ThreshDastMedium = config['dast']['medium'] if 'medium' in 'dast' else '', + ThreshDastHigh = config['dast']['high'] if 'high' in 'dast' else '', + ThreshDastCritical = config['dast']['critical'] if 'critical' in 'dast' else '', + ThreshDastApiLow = config['dastapi']['low'] if 'low' in 'dastapi' else '', + ThreshDastApiMedium = config['dastapi']['medium'] if 'medium' in 'dastapi' else '', + ThreshDastApiHigh = config['dastapi']['high'] if 'high' in 'dastapi' else '', + ThreshDastApiCritical = config['dastapi']['critical'] if 'critical' in 'dastapi' else '', + ThreshInfrastructureLow = config['infrastructure']['low'] if 'low' in 'infrastructure' else '', + ThreshInfrastructureMedium = config['infrastructure']['medium'] if 'medium' in 'infrastructure' else '', + ThreshInfrastructureHigh = config['infrastructure']['high'] if 'high' in 'infrastructure' else '', + ThreshInfrastructureCritical = config['infrastructure']['critical'] if 'critical' in 'infrastructure' else '', + ThreshSastLow = config['sast']['low'] if 'low' in 'sast' else '', + ThreshSastMedium = config['sast']['medium'] if 'medium' in 'sast' else '', + ThreshSastHigh = config['sast']['high'] if 'high' in 'sast' else '', + ThreshSastCritical = config['sast']['critical'] if 'critical' in 'sast' else '', + ThreshIacLow = config['iac']['low'] if 'low' in 'iac' else '', + ThreshIacMedium = config['iac']['medium'] if 'medium' in 'iac' else '', + ThreshIacHigh = config['iac']['high'] if 'high' in 'iac' else '', + ThreshIacCritical = config['iac']['critical'] if 'critical' in 'iac' else '', + ThreshSecretsLow = config['secret']['low'] if 'low' in 'secret' else '', + ThreshSecretsMedium = config['secret']['medium'] if 'medium' in 'secret' else '', + ThreshSecretsHigh = config['secret']['high'] if 'high' in 'secret' else '', + ThreshSecretsCritical = config['secret']['critical'] if 'critical' in 'secret' else '', ) db.session.add(job) db_connection_handler(db) From c5242c921e8af6ec7aee9320f94de9bba4254722 Mon Sep 17 00:00:00 2001 From: bkaiserinfosec <49665796+bkaiserinfosec@users.noreply.github.com> Date: Sun, 17 Mar 2024 18:13:34 -0700 Subject: [PATCH 051/197] update settings and groups --- src/vr/admin/models.py | 37 ++++ src/vr/admin/routes/settings.py | 303 +++++++++++++++++++++++---- src/vr/db_models/setup.py | 37 ++++ src/vr/templates/admin/settings.html | 281 ++++++++++++++++++++++++- 4 files changed, 615 insertions(+), 43 deletions(-) diff --git a/src/vr/admin/models.py b/src/vr/admin/models.py index 1048b3d0..89785772 100644 --- a/src/vr/admin/models.py +++ b/src/vr/admin/models.py @@ -416,6 +416,43 @@ class AppConfig(db.Model): __tablename__ = 'AppConfig' id = db.Column(db.Integer, primary_key=True) first_access = db.Column(db.Boolean, nullable=False, default=True) + settings_initialized = db.Column(db.Boolean, nullable=False, default=False) + APP_EXT_URL = db.Column(db.String(200)) + AUTH_TYPE = db.Column(db.String(200)) + AZAD_AUTHORITY = db.Column(db.String(200)) + AZAD_CLIENT_ID = db.Column(db.String(200)) + AZAD_CLIENT_SECRET = db.Column(db.String(200)) + AZURE_KEYVAULT_NAME = db.Column(db.String(200)) + ENV = db.Column(db.String(200)) + INSECURE_OAUTH = db.Column(db.String(200)) + JENKINS_HOST = db.Column(db.String(200)) + JENKINS_KEY = db.Column(db.String(200)) + JENKINS_PROJECT = db.Column(db.String(200)) + JENKINS_STAGING_PROJECT = db.Column(db.String(200)) + JENKINS_TOKEN = db.Column(db.String(200)) + JENKINS_USER = db.Column(db.String(200)) + LDAP_BASE_DN = db.Column(db.String(200)) + LDAP_BIND_USER_DN = db.Column(db.String(200)) + LDAP_BIND_USER_PASSWORD = db.Column(db.String(200)) + LDAP_GROUP_DN = db.Column(db.String(200)) + LDAP_HOST = db.Column(db.String(200)) + LDAP_PORT = db.Column(db.String(200)) + LDAP_USER_DN = db.Column(db.String(200)) + LDAP_USER_LOGIN_ATTR = db.Column(db.String(200)) + LDAP_USER_RDN_ATTR = db.Column(db.String(200)) + PROD_DB_URI = db.Column(db.String(200)) + SMTP_ADMIN_EMAIL = db.Column(db.String(200)) + SMTP_HOST = db.Column(db.String(200)) + SMTP_PASSWORD = db.Column(db.String(200)) + SMTP_USER = db.Column(db.String(200)) + SNOW_CLIENT_ID = db.Column(db.String(200)) + SNOW_CLIENT_SECRET = db.Column(db.String(200)) + SNOW_INSTANCE_NAME = db.Column(db.String(200)) + SNOW_PASSWORD = db.Column(db.String(200)) + SNOW_USERNAME = db.Column(db.String(200)) + VERSION = db.Column(db.String(200)) + JENKINS_ENABLED = db.Column(db.String(200)) + SNOW_ENABLED = db.Column(db.String(200)) class SuSiteConfiguration(db.Model): diff --git a/src/vr/admin/routes/settings.py b/src/vr/admin/routes/settings.py index c366ce43..a3125e54 100644 --- a/src/vr/admin/routes/settings.py +++ b/src/vr/admin/routes/settings.py @@ -1,4 +1,4 @@ -from flask import session, redirect, url_for, render_template +from flask import session, redirect, url_for, render_template, request from flask_login import login_required from vr import db, app import os @@ -10,14 +10,18 @@ AZAD_CLIENT_ID, AZAD_CLIENT_SECRET, AZAD_AUTHORITY, JENKINS_USER, AZURE_KEYVAULT_NAME, INSECURE_OAUTH, \ JENKINS_HOST, JENKINS_KEY, JENKINS_PROJECT, JENKINS_STAGING_PROJECT, JENKINS_TOKEN, SMTP_ADMIN_EMAIL, \ SMTP_HOST, SMTP_PASSWORD, SMTP_USER, SNOW_CLIENT_ID, SNOW_CLIENT_SECRET, SNOW_INSTANCE_NAME, SNOW_PASSWORD, \ - SNOW_USERNAME, VERSION + SNOW_USERNAME, VERSION, JENKINS_ENABLED, SNOW_ENABLED from flask_sqlalchemy import SQLAlchemy +from vr.admin.models import AppConfig +from vr.admin.functions import db_connection_handler +from sqlalchemy import text + NAV = { 'CAT': { "name": "Settings", "url": "admin.admin_dashboard"} } -@admin.route('/settings', methods=['GET']) +@admin.route('/settings', methods=['GET', 'POST']) @login_required def settings(): NAV['curpage'] = {"name": "Settings"} @@ -27,44 +31,263 @@ def settings(): elif status == 403: return render_template('403.html', user=user, nav_cat={}, nav_subcat='', \ nav_subsubcat='', nav_curpage={"name": "Unauthorized"}) - current_settings = { - "APP_EXT_URL": APP_EXT_URL, - "AUTH_TYPE": AUTH_TYPE, - "AZAD_AUTHORITY":AZAD_AUTHORITY, - "AZAD_CLIENT_ID": AZAD_CLIENT_ID, - "AZAD_CLIENT_SECRET": AZAD_CLIENT_SECRET, - "AZURE_KEYVAULT_NAME": AZURE_KEYVAULT_NAME, - "ENV": ENV, - "INSECURE_OAUTH": INSECURE_OAUTH, - "JENKINS_HOST": JENKINS_HOST, - "JENKINS_KEY": JENKINS_KEY, - "JENKINS_PROJECT": JENKINS_PROJECT, - "JENKINS_STAGING_PROJECT": JENKINS_STAGING_PROJECT, - "JENKINS_TOKEN": JENKINS_TOKEN, - "JENKINS_USER": JENKINS_USER, - "LDAP_BASE_DN": LDAP_BASE_DN, - "LDAP_BIND_USER_DN": LDAP_BIND_USER_DN, - "LDAP_BIND_USER_PASSWORD": LDAP_BIND_USER_PASSWORD, - "LDAP_GROUP_DN": LDAP_GROUP_DN, - "LDAP_HOST": LDAP_HOST, - "LDAP_PORT": LDAP_PORT, - "LDAP_USER_DN": LDAP_USER_DN, - "LDAP_USER_LOGIN_ATTR": LDAP_USER_LOGIN_ATTR, - "LDAP_USER_RDN_ATTR": LDAP_USER_RDN_ATTR, - "PROD_DB_URI": PROD_DB_URI, - "SMTP_ADMIN_EMAIL": SMTP_ADMIN_EMAIL, - "SMTP_HOST": SMTP_HOST, - "SMTP_PASSWORD": SMTP_PASSWORD, - "SMTP_USER": SMTP_USER, - "SNOW_CLIENT_ID": SNOW_CLIENT_ID, - "SNOW_CLIENT_SECRET": SNOW_CLIENT_SECRET, - "SNOW_INSTANCE_NAME": SNOW_INSTANCE_NAME, - "SNOW_PASSWORD": SNOW_PASSWORD, - "SNOW_USERNAME": SNOW_USERNAME, - "VERSION": VERSION, - } + if request.method == 'POST': + app_config = AppConfig.query.first() + + all = request.form + update_json = { + AppConfig.JENKINS_ENABLED: all["JENKINS_ENABLED"], + AppConfig.SNOW_ENABLED: all["SNOW_ENABLED"], + AppConfig.APP_EXT_URL: all["APP_EXT_URL"], + AppConfig.AUTH_TYPE: all["AUTH_TYPE"], + AppConfig.AZAD_AUTHORITY: all["AZAD_AUTHORITY"], + AppConfig.AZAD_CLIENT_ID: all["AZAD_CLIENT_ID"], + AppConfig.AZAD_CLIENT_SECRET: all["AZAD_CLIENT_SECRET"], + AppConfig.AZURE_KEYVAULT_NAME: all["AZURE_KEYVAULT_NAME"], + AppConfig.ENV: all["ENV"], + AppConfig.INSECURE_OAUTH: all["INSECURE_OAUTH"], + AppConfig.JENKINS_HOST: all["JENKINS_HOST"], + AppConfig.JENKINS_KEY: all["JENKINS_KEY"], + AppConfig.JENKINS_PROJECT: all["JENKINS_PROJECT"], + AppConfig.JENKINS_STAGING_PROJECT: all["JENKINS_STAGING_PROJECT"], + AppConfig.JENKINS_TOKEN: all["JENKINS_TOKEN"], + AppConfig.JENKINS_USER: all["JENKINS_USER"], + AppConfig.LDAP_BASE_DN: all["LDAP_BASE_DN"], + AppConfig.LDAP_BIND_USER_DN: all["LDAP_BIND_USER_DN"], + AppConfig.LDAP_BIND_USER_PASSWORD: all["LDAP_BIND_USER_PASSWORD"], + AppConfig.LDAP_GROUP_DN: all["LDAP_GROUP_DN"], + AppConfig.LDAP_HOST: all["LDAP_HOST"], + AppConfig.LDAP_PORT: all["LDAP_PORT"], + AppConfig.LDAP_USER_DN: all["LDAP_USER_DN"], + AppConfig.LDAP_USER_LOGIN_ATTR: all["LDAP_USER_LOGIN_ATTR"], + AppConfig.LDAP_USER_RDN_ATTR: all["LDAP_USER_RDN_ATTR"], + AppConfig.PROD_DB_URI: all["PROD_DB_URI"], + AppConfig.SMTP_ADMIN_EMAIL: all["SMTP_ADMIN_EMAIL"], + AppConfig.SMTP_HOST: all["SMTP_HOST"], + AppConfig.SMTP_PASSWORD: all["SMTP_PASSWORD"], + AppConfig.SMTP_USER: all["SMTP_USER"], + AppConfig.SNOW_CLIENT_ID: all["SNOW_CLIENT_ID"], + AppConfig.SNOW_CLIENT_SECRET: all["SNOW_CLIENT_SECRET"], + AppConfig.SNOW_INSTANCE_NAME: all["SNOW_INSTANCE_NAME"], + AppConfig.SNOW_PASSWORD: all["SNOW_PASSWORD"], + AppConfig.SNOW_USERNAME: all["SNOW_USERNAME"], + AppConfig.VERSION: all["VERSION"], + } + if not app_config.settings_initialized: + update_json[AppConfig.settings_initialized] = True + db.session.query(AppConfig) \ + .update(update_json, synchronize_session=False) + db_connection_handler(db) + set_env_variables(all) + current_settings = { + "JENKINS_ENABLED": all["JENKINS_ENABLED"], + "SNOW_ENABLED": all["SNOW_ENABLED"], + "APP_EXT_URL": all["APP_EXT_URL"], + "AUTH_TYPE": all["AUTH_TYPE"], + "AZAD_AUTHORITY": all["AZAD_AUTHORITY"], + "AZAD_CLIENT_ID": all["AZAD_CLIENT_ID"], + "AZAD_CLIENT_SECRET": all["AZAD_CLIENT_SECRET"], + "AZURE_KEYVAULT_NAME": all["AZURE_KEYVAULT_NAME"], + "ENV": all["ENV"], + "INSECURE_OAUTH": all["INSECURE_OAUTH"], + "JENKINS_HOST": all["JENKINS_HOST"], + "JENKINS_KEY": all["JENKINS_KEY"], + "JENKINS_PROJECT": all["JENKINS_PROJECT"], + "JENKINS_STAGING_PROJECT": all["JENKINS_STAGING_PROJECT"], + "JENKINS_TOKEN": all["JENKINS_TOKEN"], + "JENKINS_USER": all["JENKINS_USER"], + "LDAP_BASE_DN": all["LDAP_BASE_DN"], + "LDAP_BIND_USER_DN": all["LDAP_BIND_USER_DN"], + "LDAP_BIND_USER_PASSWORD": all["LDAP_BIND_USER_PASSWORD"], + "LDAP_GROUP_DN": all["LDAP_GROUP_DN"], + "LDAP_HOST": all["LDAP_HOST"], + "LDAP_PORT": all["LDAP_PORT"], + "LDAP_USER_DN": all["LDAP_USER_DN"], + "LDAP_USER_LOGIN_ATTR": all["LDAP_USER_LOGIN_ATTR"], + "LDAP_USER_RDN_ATTR": all["LDAP_USER_RDN_ATTR"], + "PROD_DB_URI": all["PROD_DB_URI"], + "SMTP_ADMIN_EMAIL": all["SMTP_ADMIN_EMAIL"], + "SMTP_HOST": all["SMTP_HOST"], + "SMTP_PASSWORD": all["SMTP_PASSWORD"], + "SMTP_USER": all["SMTP_USER"], + "SNOW_CLIENT_ID": all["SNOW_CLIENT_ID"], + "SNOW_CLIENT_SECRET": all["SNOW_CLIENT_SECRET"], + "SNOW_INSTANCE_NAME": all["SNOW_INSTANCE_NAME"], + "SNOW_PASSWORD": all["SNOW_PASSWORD"], + "SNOW_USERNAME": all["SNOW_USERNAME"], + "VERSION": all["VERSION"], + } + else: + app_config = AppConfig.query.first() + if app_config.settings_initialized: + current_settings = { + "JENKINS_ENABLED": app_config.JENKINS_ENABLED, + "SNOW_ENABLED": app_config.SNOW_ENABLED, + "APP_EXT_URL": app_config.APP_EXT_URL, + "AUTH_TYPE": app_config.AUTH_TYPE, + "AZAD_AUTHORITY": app_config.AZAD_AUTHORITY, + "AZAD_CLIENT_ID": app_config.AZAD_CLIENT_ID, + "AZAD_CLIENT_SECRET": app_config.AZAD_CLIENT_SECRET, + "AZURE_KEYVAULT_NAME": app_config.AZURE_KEYVAULT_NAME, + "ENV": app_config.ENV, + "INSECURE_OAUTH": app_config.INSECURE_OAUTH, + "JENKINS_HOST": app_config.JENKINS_HOST, + "JENKINS_KEY": app_config.JENKINS_KEY, + "JENKINS_PROJECT": app_config.JENKINS_PROJECT, + "JENKINS_STAGING_PROJECT": app_config.JENKINS_STAGING_PROJECT, + "JENKINS_USER": app_config.JENKINS_USER, + "JENKINS_TOKEN": app_config.JENKINS_TOKEN, + "LDAP_BASE_DN": app_config.LDAP_BASE_DN, + "LDAP_BIND_USER_DN": app_config.LDAP_BIND_USER_DN, + "LDAP_BIND_USER_PASSWORD": app_config.LDAP_BIND_USER_PASSWORD, + "LDAP_GROUP_DN": app_config.LDAP_GROUP_DN, + "LDAP_HOST": app_config.LDAP_HOST, + "LDAP_PORT": app_config.LDAP_PORT, + "LDAP_USER_DN": app_config.LDAP_USER_DN, + "LDAP_USER_LOGIN_ATTR": app_config.LDAP_USER_LOGIN_ATTR, + "LDAP_USER_RDN_ATTR": app_config.LDAP_USER_RDN_ATTR, + "PROD_DB_URI": app_config.PROD_DB_URI, + "SMTP_ADMIN_EMAIL": app_config.SMTP_ADMIN_EMAIL, + "SMTP_HOST": app_config.SMTP_HOST, + "SMTP_USER": app_config.SMTP_USER, + "SMTP_PASSWORD": app_config.SMTP_PASSWORD, + "SNOW_CLIENT_ID": app_config.SNOW_CLIENT_ID, + "SNOW_CLIENT_SECRET": app_config.SNOW_CLIENT_SECRET, + "SNOW_INSTANCE_NAME": app_config.SNOW_INSTANCE_NAME, + "SNOW_USERNAME": app_config.SNOW_USERNAME, + "SNOW_PASSWORD": app_config.SNOW_PASSWORD, + "VERSION": app_config.VERSION, + } + else: + current_settings = { + "JENKINS_ENABLED": JENKINS_ENABLED, + "SNOW_ENABLED": SNOW_ENABLED, + "APP_EXT_URL": APP_EXT_URL, + "AUTH_TYPE": AUTH_TYPE, + "AZAD_AUTHORITY":AZAD_AUTHORITY, + "AZAD_CLIENT_ID": AZAD_CLIENT_ID, + "AZAD_CLIENT_SECRET": AZAD_CLIENT_SECRET, + "AZURE_KEYVAULT_NAME": AZURE_KEYVAULT_NAME, + "ENV": ENV, + "INSECURE_OAUTH": INSECURE_OAUTH, + "JENKINS_HOST": JENKINS_HOST, + "JENKINS_KEY": JENKINS_KEY, + "JENKINS_PROJECT": JENKINS_PROJECT, + "JENKINS_STAGING_PROJECT": JENKINS_STAGING_PROJECT, + "JENKINS_USER": JENKINS_USER, + "JENKINS_TOKEN": JENKINS_TOKEN, + "LDAP_BASE_DN": LDAP_BASE_DN, + "LDAP_BIND_USER_DN": LDAP_BIND_USER_DN, + "LDAP_BIND_USER_PASSWORD": LDAP_BIND_USER_PASSWORD, + "LDAP_GROUP_DN": LDAP_GROUP_DN, + "LDAP_HOST": LDAP_HOST, + "LDAP_PORT": LDAP_PORT, + "LDAP_USER_DN": LDAP_USER_DN, + "LDAP_USER_LOGIN_ATTR": LDAP_USER_LOGIN_ATTR, + "LDAP_USER_RDN_ATTR": LDAP_USER_RDN_ATTR, + "PROD_DB_URI": PROD_DB_URI, + "SMTP_ADMIN_EMAIL": SMTP_ADMIN_EMAIL, + "SMTP_HOST": SMTP_HOST, + "SMTP_USER": SMTP_USER, + "SMTP_PASSWORD": SMTP_PASSWORD, + "SNOW_CLIENT_ID": SNOW_CLIENT_ID, + "SNOW_CLIENT_SECRET": SNOW_CLIENT_SECRET, + "SNOW_INSTANCE_NAME": SNOW_INSTANCE_NAME, + "SNOW_USERNAME": SNOW_USERNAME, + "SNOW_PASSWORD": SNOW_PASSWORD, + "VERSION": VERSION, + } + cat_general = [ + 'APP_EXT_URL', + 'AUTH_TYPE', + 'ENV', + 'INSECURE_OAUTH', + 'PROD_DB_URI', + 'VERSION', + 'AZURE_KEYVAULT_NAME' + ] + cat_azad = [ + 'AZAD_AUTHORITY', + 'AZAD_CLIENT_ID', + 'AZAD_CLIENT_SECRET' + ] + cat_jenkins = [ + 'JENKINS_ENABLED', + 'JENKINS_HOST', + 'JENKINS_KEY', + 'JENKINS_PROJECT', + 'JENKINS_STAGING_PROJECT', + 'JENKINS_TOKEN', + 'JENKINS_USER' + ] + cat_ldap = [ + 'LDAP_BASE_DN', + 'LDAP_BIND_USER_DN', + 'LDAP_BIND_USER_PASSWORD', + 'LDAP_GROUP_DN', + 'LDAP_HOST', + 'LDAP_PORT', + 'LDAP_USER_DN', + 'LDAP_USER_LOGIN_ATTR', + 'LDAP_USER_RDN_ATTR' + ] + smtp_settings = [ + 'SMTP_ADMIN_EMAIL', + 'SMTP_HOST', + 'SMTP_PASSWORD', + 'SMTP_USER' + ] + snow_settings = [ + 'SNOW_ENABLED', + 'SNOW_CLIENT_ID', + 'SNOW_CLIENT_SECRET', + 'SNOW_INSTANCE_NAME', + 'SNOW_PASSWORD', + 'SNOW_USERNAME' + ] return render_template('admin/settings.html', user_roles=user_roles, NAV=NAV, - user=user, settings=current_settings) + user=user, settings=current_settings, cat_general=cat_general, + cat_azad=cat_azad, cat_jenkins=cat_jenkins, cat_ldap=cat_ldap, + smtp_settings=smtp_settings, snow_settings=snow_settings) + +def set_env_variables(form): + os.environ['APP_EXT_URL'] = form["APP_EXT_URL"] + os.environ['AUTH_TYPE'] = form["AUTH_TYPE"] + os.environ['AZAD_AUTHORITY'] = form["AZAD_AUTHORITY"] + os.environ['AZAD_CLIENT_ID'] = form["AZAD_CLIENT_ID"] + os.environ['AZAD_CLIENT_SECRET'] = form["AZAD_CLIENT_SECRET"] + os.environ['AZURE_KEYVAULT_NAME'] = form["AZURE_KEYVAULT_NAME"] + os.environ['ENV'] = form["ENV"] + os.environ['INSECURE_OAUTH'] = form["INSECURE_OAUTH"] + os.environ['JENKINS_ENABLED'] = form["JENKINS_ENABLED"] + os.environ['JENKINS_HOST'] = form["JENKINS_HOST"] + os.environ['JENKINS_KEY'] = form["JENKINS_KEY"] + os.environ['JENKINS_PROJECT'] = form["JENKINS_PROJECT"] + os.environ['JENKINS_STAGING_PROJECT'] = form["JENKINS_STAGING_PROJECT"] + os.environ['JENKINS_TOKEN'] = form["JENKINS_TOKEN"] + os.environ['JENKINS_USER'] = form["JENKINS_USER"] + os.environ['LDAP_BASE_DN'] = form["LDAP_BASE_DN"] + os.environ['LDAP_BIND_USER_DN'] = form["LDAP_BIND_USER_DN"] + os.environ['LDAP_BIND_USER_PASSWORD'] = form["LDAP_BIND_USER_PASSWORD"] + os.environ['LDAP_GROUP_DN'] = form["LDAP_GROUP_DN"] + os.environ['LDAP_HOST'] = form["LDAP_HOST"] + os.environ['LDAP_PORT'] = form["LDAP_PORT"] + os.environ['LDAP_USER_DN'] = form["LDAP_USER_DN"] + os.environ['LDAP_USER_LOGIN_ATTR'] = form["LDAP_USER_LOGIN_ATTR"] + os.environ['LDAP_USER_RDN_ATTR'] = form["LDAP_USER_RDN_ATTR"] + os.environ['PROD_DB_URI'] = form["PROD_DB_URI"] + os.environ['SMTP_ADMIN_EMAIL'] = form["SMTP_ADMIN_EMAIL"] + os.environ['SMTP_HOST'] = form["SMTP_HOST"] + os.environ['SMTP_PASSWORD'] = form["SMTP_PASSWORD"] + os.environ['SMTP_USER'] = form["SMTP_USER"] + os.environ['SNOW_ENABLED'] = form["SNOW_ENABLED"] + os.environ['SNOW_CLIENT_ID'] = form["SNOW_CLIENT_ID"] + os.environ['SNOW_CLIENT_SECRET'] = form["SNOW_CLIENT_SECRET"] + os.environ['SNOW_INSTANCE_NAME'] = form["SNOW_INSTANCE_NAME"] + os.environ['SNOW_PASSWORD'] = form["SNOW_PASSWORD"] + os.environ['SNOW_USERNAME'] = form["SNOW_USERNAME"] + os.environ['VERSION'] = form["VERSION"] + @admin.route('/dangerous/delete_all', methods=['POST']) def delete_all_data(): diff --git a/src/vr/db_models/setup.py b/src/vr/db_models/setup.py index 67adfc3b..b36fdc22 100644 --- a/src/vr/db_models/setup.py +++ b/src/vr/db_models/setup.py @@ -117,6 +117,43 @@ class AppConfig(db.Model): __table_args__ = {'extend_existing': True} id = db.Column(db.Integer, primary_key=True) first_access = db.Column(db.Boolean, nullable=False, default=True) + settings_initialized = db.Column(db.Boolean, nullable=False, default=False) + APP_EXT_URL = db.Column(db.String(200)) + AUTH_TYPE = db.Column(db.String(200)) + AZAD_AUTHORITY = db.Column(db.String(200)) + AZAD_CLIENT_ID = db.Column(db.String(200)) + AZAD_CLIENT_SECRET = db.Column(db.String(200)) + AZURE_KEYVAULT_NAME = db.Column(db.String(200)) + ENV = db.Column(db.String(200)) + INSECURE_OAUTH = db.Column(db.String(200)) + JENKINS_HOST = db.Column(db.String(200)) + JENKINS_KEY = db.Column(db.String(200)) + JENKINS_PROJECT = db.Column(db.String(200)) + JENKINS_STAGING_PROJECT = db.Column(db.String(200)) + JENKINS_TOKEN = db.Column(db.String(200)) + JENKINS_USER = db.Column(db.String(200)) + LDAP_BASE_DN = db.Column(db.String(200)) + LDAP_BIND_USER_DN = db.Column(db.String(200)) + LDAP_BIND_USER_PASSWORD = db.Column(db.String(200)) + LDAP_GROUP_DN = db.Column(db.String(200)) + LDAP_HOST = db.Column(db.String(200)) + LDAP_PORT = db.Column(db.String(200)) + LDAP_USER_DN = db.Column(db.String(200)) + LDAP_USER_LOGIN_ATTR = db.Column(db.String(200)) + LDAP_USER_RDN_ATTR = db.Column(db.String(200)) + PROD_DB_URI = db.Column(db.String(200)) + SMTP_ADMIN_EMAIL = db.Column(db.String(200)) + SMTP_HOST = db.Column(db.String(200)) + SMTP_PASSWORD = db.Column(db.String(200)) + SMTP_USER = db.Column(db.String(200)) + SNOW_CLIENT_ID = db.Column(db.String(200)) + SNOW_CLIENT_SECRET = db.Column(db.String(200)) + SNOW_INSTANCE_NAME = db.Column(db.String(200)) + SNOW_PASSWORD = db.Column(db.String(200)) + SNOW_USERNAME = db.Column(db.String(200)) + VERSION = db.Column(db.String(200)) + JENKINS_ENABLED = db.Column(db.String(200)) + SNOW_ENABLED = db.Column(db.String(200)) AppConfig() diff --git a/src/vr/templates/admin/settings.html b/src/vr/templates/admin/settings.html index 06a4bee5..a7564e1a 100644 --- a/src/vr/templates/admin/settings.html +++ b/src/vr/templates/admin/settings.html @@ -113,13 +113,135 @@