devsecops-engine-tools 1.7.29__py3-none-any.whl → 1.7.30__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of devsecops-engine-tools might be problematic. Click here for more details.

@@ -11,12 +11,12 @@ from devsecops_engine_tools.engine_utilities.github.models.GithubPredefinedVaria
11
11
  from devsecops_engine_tools.engine_utilities.github.infrastructure.github_api import (
12
12
  GithubApi,
13
13
  )
14
- import os
15
14
 
16
15
 
17
16
  @dataclass
18
17
  class GithubActions(DevopsPlatformGateway):
19
18
  OKGREEN = "\033[92m"
19
+ WARNING = "\033[93m"
20
20
  FAIL = "\033[91m"
21
21
  ENDC = "\033[0m"
22
22
  ICON_FAIL = "\u2718"
@@ -49,7 +49,8 @@ class GithubActions(DevopsPlatformGateway):
49
49
  def result_pipeline(self, type):
50
50
  results = {
51
51
  "failed": f"{self.FAIL}{self.ICON_FAIL}Failed{self.ENDC}",
52
- "succeeded": f"{self.OKGREEN}{self.ICON_SUCCESS}Succeeded{self.ENDC}"
52
+ "succeeded": f"{self.OKGREEN}{self.ICON_SUCCESS}Succeeded{self.ENDC}",
53
+ "succeeded_with_issues": f"{self.WARNING}{self.ICON_SUCCESS}Succeeded with issues{self.ENDC}"
53
54
  }
54
55
  return results.get(type)
55
56
 
@@ -77,10 +78,10 @@ class GithubActions(DevopsPlatformGateway):
77
78
  "repository": BuildVariables.github_repository,
78
79
  "pipeline_name": (
79
80
  BuildVariables.github_workflow
80
- if SystemVariables.build.value() == "build"
81
+ if SystemVariables.github_job.value() == "build"
81
82
  else ReleaseVariables.github_workflow
82
83
  ),
83
- "stage": SystemVariables.build,
84
+ "stage": SystemVariables.github_job,
84
85
  "path_directory": SystemVariables.github_workspace,
85
86
  "os": AgentVariables.runner_os,
86
87
  "work_folder": AgentVariables.github_workspace,
@@ -24,7 +24,7 @@ class BaseEnum(Enum):
24
24
  class SystemVariables(BaseEnum):
25
25
  github_access_token = "github.access.token"
26
26
  github_workspace = "github.workspace"
27
- build = "build"
27
+ github_job = "github.job"
28
28
  github_server_url = "github.server.url"
29
29
  github_repository = "github.repository"
30
30
  github_event_number = "github.event.number"
@@ -1 +1 @@
1
- version = '1.7.29'
1
+ version = '1.7.30'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: devsecops-engine-tools
3
- Version: 1.7.29
3
+ Version: 1.7.30
4
4
  Summary: Tool for DevSecOps strategy
5
5
  Home-page: https://github.com/bancolombia/devsecops-engine-tools
6
6
  Author: Bancolombia DevSecOps Team
@@ -150,6 +150,57 @@ devsecops-engine-tools --platform_devops local --remote_config_repo DevSecOps_Re
150
150
 
151
151
  ![Dashboard Grafana](docs/demo_session.svg)
152
152
 
153
+ ### Scan running sample - Github Actions
154
+
155
+ The remote config should be in a GitHub repository, either public or private.
156
+
157
+ **If the repository is public:**
158
+
159
+ 1. The yml file containing the workflow should be configured using the default secret **GITHUB_TOKEN**.
160
+ For more information, refer to [Automatic token authentication](https://docs.github.com/en/actions/security-guides/automatic-token-authentication).
161
+
162
+ **If the repository is private:**
163
+
164
+ 1. Create a personal access token with the necessary permissions to access the repository.
165
+ 2. Add the token as a secret in the GitHub repository.
166
+ ![Dashboard Grafana](docs/secret_token.png)
167
+
168
+ 3. Configure the yml file containing the workflow using the created secret.
169
+
170
+ **Example of the workflow yml:**
171
+
172
+ ```yaml
173
+ name: DevSecOps Engine Tools
174
+ on:
175
+ push:
176
+ branches:
177
+ - feature/*
178
+ env:
179
+ GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESSTOKEN }} #In this case, the remote config repository is private
180
+ # When the remote config repository is public, the secret should be like this: ${{ secrets.GITHUB_TOKEN }}
181
+
182
+ jobs:
183
+ release:
184
+ runs-on: ubuntu-latest
185
+ steps:
186
+ - uses: actions/checkout@v4
187
+
188
+ - name: Set up Python
189
+ uses: actions/setup-python@v5
190
+ with:
191
+ python-version: "3.12"
192
+
193
+ - name: Set up Python
194
+ run: |
195
+ # Install devsecops-engine-tools
196
+ pip3 install -q devsecops-engine-tools
197
+ output=$(devsecops-engine-tools --platform_devops github --remote_config_repo remote_config --tool engine_iac)
198
+ echo "$output"
199
+ if [[ $output == *"✘Failed"* ]]; then
200
+ exit 1
201
+ fi
202
+ ```
203
+
153
204
  # Metrics
154
205
 
155
206
  With the flag **--send_metrics true** and the configuration of the AWS-METRICS_MANAGER driven adapter in ConfigTool.json of the engine_core the tool will send the report to bucket s3. In the [metrics](https://github.com/bancolombia/devsecops-engine-tools/blob/trunk/metrics/) folder you will find the base of the cloud formation template to deploy the infra and dashboard in grafana.
@@ -1,5 +1,5 @@
1
1
  devsecops_engine_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- devsecops_engine_tools/version.py,sha256=1ZRQMXakbKgdqgC-xNRAgwTBDcQ7kv9IvKeDbDzIzfw,19
2
+ devsecops_engine_tools/version.py,sha256=2bo_22qNwsnrNeWcMU7gzJpKzTs2yNbEKUnDuc_CBeU,19
3
3
  devsecops_engine_tools/engine_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  devsecops_engine_tools/engine_core/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  devsecops_engine_tools/engine_core/src/applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -38,7 +38,7 @@ devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/azure/azur
38
38
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_dojo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_dojo/defect_dojo.py,sha256=qOqipt7P6THEjoaBwpIPO8OEN9OKpW6u_X_c4DeGhx8,10903
40
40
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
- devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/github/github_actions.py,sha256=PsDCUfVHgUJL9AKwB2FyQ6VdUtgawyYTtvRcSscX_9A,3723
41
+ devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/github/github_actions.py,sha256=JhTfHCR4G29VByrS7ntKZwXbfCHpO0C3D8vIQlBD4rQ,3855
42
42
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/printer_pretty_table/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/printer_pretty_table/printer_pretty_table.py,sha256=O1waYz_6ElcOkU3Nb4suJs2ZJIo0YLoFuNXi9-j-wSs,3811
44
44
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/runtime_local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -232,7 +232,7 @@ devsecops_engine_tools/engine_utilities/defect_dojo/infraestructure/repository/_
232
232
  devsecops_engine_tools/engine_utilities/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
233
233
  devsecops_engine_tools/engine_utilities/github/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
234
234
  devsecops_engine_tools/engine_utilities/github/infrastructure/github_api.py,sha256=AURk8GGAkNuHCqTEsiS6UxClL_YYJoqtBrWGBSYgWO4,2436
235
- devsecops_engine_tools/engine_utilities/github/models/GithubPredefinedVariables.py,sha256=uPoiBRo0tlxQ69cqob40hmIdNk1BSbKqF1hpjsvhXdQ,1579
235
+ devsecops_engine_tools/engine_utilities/github/models/GithubPredefinedVariables.py,sha256=LmIvCVDyszInElu_-Pt034q1Zaajp-QA3ge-RtimxHg,1589
236
236
  devsecops_engine_tools/engine_utilities/github/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
237
237
  devsecops_engine_tools/engine_utilities/input_validations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
238
238
  devsecops_engine_tools/engine_utilities/input_validations/env_utils.py,sha256=nHp9YIuG1k-IvxssQslrE9ny62juJMovmBTzcM7PPk0,258
@@ -247,8 +247,8 @@ devsecops_engine_tools/engine_utilities/utils/logger_info.py,sha256=4Mz8Bwlm9Mku
247
247
  devsecops_engine_tools/engine_utilities/utils/name_conversion.py,sha256=ADJrRGaxYSDe0ZRh6VHRf53H4sXPcb-vNP_i81PUn3I,307
248
248
  devsecops_engine_tools/engine_utilities/utils/printers.py,sha256=GAslbWaBpwP3mP6fBsgVl07TTBgcCggQTy8h2M9ibeo,612
249
249
  devsecops_engine_tools/engine_utilities/utils/session_manager.py,sha256=yNtlT-8Legz1sHbGPH8LNYjL-LgDUE0zXG2rYjiab7U,290
250
- devsecops_engine_tools-1.7.29.dist-info/METADATA,sha256=vUeXrSsQrFqqYsv9W4qKTyf9l6-sBll7JOd-yHDG2E0,5969
251
- devsecops_engine_tools-1.7.29.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
252
- devsecops_engine_tools-1.7.29.dist-info/entry_points.txt,sha256=9IjXF_7Zpgowq_SY6OSmsA9vZze18a8_AeHwkQVrgKk,131
253
- devsecops_engine_tools-1.7.29.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
254
- devsecops_engine_tools-1.7.29.dist-info/RECORD,,
250
+ devsecops_engine_tools-1.7.30.dist-info/METADATA,sha256=Lu8_dE2_ssmQOfaTIzsip95UrGa1F2ptMWzYR2uS5UM,7605
251
+ devsecops_engine_tools-1.7.30.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
252
+ devsecops_engine_tools-1.7.30.dist-info/entry_points.txt,sha256=9IjXF_7Zpgowq_SY6OSmsA9vZze18a8_AeHwkQVrgKk,131
253
+ devsecops_engine_tools-1.7.30.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
254
+ devsecops_engine_tools-1.7.30.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.2.0)
2
+ Generator: setuptools (70.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5