spaceforge 1.1.6__tar.gz → 1.1.7__tar.gz

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.
Files changed (76) hide show
  1. {spaceforge-1.1.6/spaceforge.egg-info → spaceforge-1.1.7}/PKG-INFO +1 -1
  2. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/checkov/plugin.py +58 -60
  3. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/checkov/plugin.yaml +141 -72
  4. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/enviroment_manager/plugin.py +126 -114
  5. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/enviroment_manager/plugin.yaml +126 -114
  6. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/envsubst/plugin.py +26 -26
  7. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/envsubst/plugin.yaml +28 -28
  8. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/infracost/plugin.py +7 -6
  9. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/infracost/plugin.yaml +7 -6
  10. spaceforge-1.1.7/plugins/opentofu-tracing/plugin.py +443 -0
  11. spaceforge-1.1.7/plugins/opentofu-tracing/plugin.yaml +719 -0
  12. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/sops/plugin.py +27 -25
  13. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/sops/plugin.yaml +28 -26
  14. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/terrascan/plugin.py +40 -40
  15. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/terrascan/plugin.yaml +93 -43
  16. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/trivy/plugin.py +1 -1
  17. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/trivy/plugin.yaml +17 -17
  18. spaceforge-1.1.7/plugins/trufflehog/README.md +42 -0
  19. spaceforge-1.1.7/plugins/trufflehog/plugin.py +285 -0
  20. spaceforge-1.1.7/plugins/trufflehog/plugin.yaml +454 -0
  21. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/wiz/plugin.py +48 -32
  22. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/wiz/plugin.yaml +49 -33
  23. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/_version_scm.py +3 -3
  24. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/generator.py +4 -2
  25. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/templates/binary_install.sh.j2 +1 -1
  26. {spaceforge-1.1.6 → spaceforge-1.1.7/spaceforge.egg-info}/PKG-INFO +1 -1
  27. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge.egg-info/SOURCES.txt +3 -0
  28. {spaceforge-1.1.6 → spaceforge-1.1.7}/test.sh +4 -4
  29. spaceforge-1.1.6/plugins/opentofu-tracing/plugin.py +0 -83
  30. spaceforge-1.1.6/plugins/opentofu-tracing/plugin.yaml +0 -149
  31. {spaceforge-1.1.6 → spaceforge-1.1.7}/.github/workflows/ci.yml +0 -0
  32. {spaceforge-1.1.6 → spaceforge-1.1.7}/.github/workflows/release.yml +0 -0
  33. {spaceforge-1.1.6 → spaceforge-1.1.7}/.gitignore +0 -0
  34. {spaceforge-1.1.6 → spaceforge-1.1.7}/CONTRIBUTING.md +0 -0
  35. {spaceforge-1.1.6 → spaceforge-1.1.7}/LICENSE +0 -0
  36. {spaceforge-1.1.6 → spaceforge-1.1.7}/MANIFEST.in +0 -0
  37. {spaceforge-1.1.6 → spaceforge-1.1.7}/README.md +0 -0
  38. {spaceforge-1.1.6 → spaceforge-1.1.7}/go.mod +0 -0
  39. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/checkov/README.md +0 -0
  40. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/checkov/requirements.txt +0 -0
  41. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/enviroment_manager/requirements.txt +0 -0
  42. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/sops/requirements.txt +0 -0
  43. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/terrascan/README.md +0 -0
  44. {spaceforge-1.1.6 → spaceforge-1.1.7}/plugins/trivy/README.md +0 -0
  45. {spaceforge-1.1.6 → spaceforge-1.1.7}/pyproject.toml +0 -0
  46. {spaceforge-1.1.6 → spaceforge-1.1.7}/regenerate_plugins.sh +0 -0
  47. {spaceforge-1.1.6 → spaceforge-1.1.7}/setup.cfg +0 -0
  48. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/README.md +0 -0
  49. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/__init__.py +0 -0
  50. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/__main__.py +0 -0
  51. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/_version.py +0 -0
  52. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/cls.py +0 -0
  53. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/conftest.py +0 -0
  54. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/plugin.py +0 -0
  55. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/runner.py +0 -0
  56. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/schema.json +0 -0
  57. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/templates/ensure_spaceforge_and_run.sh.j2 +0 -0
  58. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_cls.py +0 -0
  59. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_generator.py +0 -0
  60. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_generator_binaries.py +0 -0
  61. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_generator_core.py +0 -0
  62. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_generator_hooks.py +0 -0
  63. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_generator_parameters.py +0 -0
  64. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_plugin.py +0 -0
  65. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_plugin_file_operations.py +0 -0
  66. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_plugin_hooks.py +0 -0
  67. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_plugin_inheritance.py +0 -0
  68. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_runner.py +0 -0
  69. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_runner_cli.py +0 -0
  70. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_runner_core.py +0 -0
  71. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge/test_runner_execution.py +0 -0
  72. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge.egg-info/dependency_links.txt +0 -0
  73. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge.egg-info/entry_points.txt +0 -0
  74. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge.egg-info/requires.txt +0 -0
  75. {spaceforge-1.1.6 → spaceforge-1.1.7}/spaceforge.egg-info/top_level.txt +0 -0
  76. {spaceforge-1.1.6 → spaceforge-1.1.7}/templates.go +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spaceforge
3
- Version: 1.1.6
3
+ Version: 1.1.7
4
4
  Summary: A Python framework for building Spacelift plugins
5
5
  Author-email: Spacelift <support@spacelift.io>
6
6
  Maintainer-email: Spacelift <support@spacelift.io>
@@ -1,88 +1,86 @@
1
- """
2
- Checkov Security Scanner Plugin
3
-
4
- This plugin runs Checkov security scanning on Terraform/OpenTofu configurations
5
- during the after_plan hook and reports findings with detailed resource-level
6
- information.
1
+ import json
2
+ import os
7
3
 
8
- ## Features
4
+ from spaceforge import Context, Parameter, Policy, SpaceforgePlugin, Variable
9
5
 
10
- - Executes Checkov against Terraform/OpenTofu configurations
11
- - Parses and categorizes security findings by severity (when available)
12
- - Generates detailed Markdown reports organized by severity level
13
- - Adds scan results to policy input for OPA policy enforcement
14
- - Supports configurable additional arguments for filtering and customization
15
6
 
16
- ## Configuration
7
+ class CheckovPlugin(SpaceforgePlugin):
8
+ """
9
+ Checkov Security Scanner Plugin
17
10
 
18
- ### Parameters
11
+ This plugin runs Checkov security scanning on Terraform/OpenTofu configurations
12
+ during the after_plan hook and reports findings with detailed resource-level
13
+ information.
19
14
 
20
- - **Additional Arguments**: Optional command-line arguments to pass to Checkov
21
- (e.g., `--check HIGH,CRITICAL` or `--skip-check CKV_AWS_123`)
15
+ ## Features
22
16
 
23
- ### Severity Support
17
+ - Executes Checkov against Terraform/OpenTofu configurations
18
+ - Parses and categorizes security findings by severity (when available)
19
+ - Generates detailed Markdown reports organized by severity level
20
+ - Adds scan results to policy input for OPA policy enforcement
21
+ - Supports configurable additional arguments for filtering and customization
24
22
 
25
- Severity levels (CRITICAL, HIGH, MEDIUM, LOW) are available when using Checkov
26
- with a Bridgecrew/Prisma Cloud API key. To enable severity data:
23
+ ## Configuration
27
24
 
28
- ```
29
- --bc-api-key YOUR_API_KEY
30
- ```
25
+ ### Parameters
31
26
 
32
- Without an API key, the plugin still works but findings are not categorized by
33
- severity in the report.
27
+ - **Additional Arguments**: Optional command-line arguments to pass to Checkov
28
+ (e.g., `--check HIGH,CRITICAL` or `--skip-check CKV_AWS_123`)
34
29
 
35
- ## Usage
30
+ ### Severity Support
36
31
 
37
- The plugin automatically runs after the plan phase and:
32
+ Severity levels (CRITICAL, HIGH, MEDIUM, LOW) are available when using Checkov
33
+ with a Bridgecrew/Prisma Cloud API key. To enable severity data:
38
34
 
39
- 1. Scans your Terraform/OpenTofu code with Checkov
40
- 2. Reports failed security checks in a formatted Markdown report
41
- 3. Organizes findings by severity level (CRITICAL, HIGH, MEDIUM, LOW) when available
42
- 4. Provides check details, resource names, file locations, and remediation links
43
- 5. Adds comprehensive scan data to policy input for OPA evaluation
35
+ ```
36
+ --bc-api-key YOUR_API_KEY
37
+ ```
44
38
 
45
- ## Example OPA Policy
39
+ Without an API key, the plugin still works but findings are not categorized by
40
+ severity in the report.
46
41
 
47
- An example Plan policy is included that denies runs based on severity thresholds.
48
- You can customize the max_critical, max_high, max_medium, and max_low values:
42
+ ## Usage
49
43
 
50
- ```rego
51
- package spacelift
44
+ The plugin automatically runs after the plan phase and:
52
45
 
53
- import rego.v1
46
+ 1. Scans your Terraform/OpenTofu code with Checkov
47
+ 2. Reports failed security checks in a formatted Markdown report
48
+ 3. Organizes findings by severity level (CRITICAL, HIGH, MEDIUM, LOW) when available
49
+ 4. Provides check details, resource names, file locations, and remediation links
50
+ 5. Adds comprehensive scan data to policy input for OPA evaluation
54
51
 
55
- # Configure maximum allowed findings by severity
56
- max_critical := 0
57
- max_high := 0
58
- max_medium := 50
59
- max_low := 100
52
+ ## Example OPA Policy
60
53
 
61
- checkov_data := input.third_party_metadata.custom.checkov
54
+ An example Plan policy is included that denies runs based on severity thresholds.
55
+ You can customize the max_critical, max_high, max_medium, and max_low values:
62
56
 
63
- deny contains sprintf("Found %d CRITICAL severity Checkov security checks", [checkov_data.summary.critical]) if {
64
- checkov_data.summary.critical > max_critical
65
- }
57
+ ```rego
58
+ package spacelift
66
59
 
67
- deny contains sprintf("Found %d HIGH severity Checkov security checks", [checkov_data.summary.high]) if {
68
- checkov_data.summary.high > max_high
69
- }
70
- ```
71
- """
60
+ import rego.v1
72
61
 
73
- import json
74
- import os
62
+ # Configure maximum allowed findings by severity
63
+ max_critical := 0
64
+ max_high := 0
65
+ max_medium := 50
66
+ max_low := 100
75
67
 
76
- from spaceforge import Context, Parameter, Policy, SpaceforgePlugin, Variable
68
+ checkov_data := input.third_party_metadata.custom.checkov
77
69
 
78
- __plugin_name__ = "checkov"
79
- __author__ = "Spacelift"
80
- __version__ = "1.0.1"
81
- __labels__ = ["security", "terraform"]
70
+ deny contains sprintf("Found %d CRITICAL severity Checkov security checks", [checkov_data.summary.critical]) if {
71
+ checkov_data.summary.critical > max_critical
72
+ }
82
73
 
74
+ deny contains sprintf("Found %d HIGH severity Checkov security checks", [checkov_data.summary.high]) if {
75
+ checkov_data.summary.high > max_high
76
+ }
77
+ ```
78
+ """
83
79
 
84
- class CheckovPlugin(SpaceforgePlugin):
85
- """Checkov security scanner plugin for Spacelift."""
80
+ __plugin_name__ = "checkov"
81
+ __author__ = "Spacelift"
82
+ __version__ = "1.0.2"
83
+ __labels__ = ["security", "terraform"]
86
84
 
87
85
  __parameters__ = [
88
86
  Parameter(
@@ -1,8 +1,79 @@
1
- name: SpaceforgePlugin
2
- version: 1.0.0
3
- description: Checkov security scanner plugin for Spacelift.
4
- author: Spacelift Team
5
- labels: []
1
+ name: checkov
2
+ version: 1.0.2
3
+ description: |-
4
+ Checkov Security Scanner Plugin
5
+
6
+ This plugin runs Checkov security scanning on Terraform/OpenTofu configurations
7
+ during the after_plan hook and reports findings with detailed resource-level
8
+ information.
9
+
10
+ ## Features
11
+
12
+ - Executes Checkov against Terraform/OpenTofu configurations
13
+ - Parses and categorizes security findings by severity (when available)
14
+ - Generates detailed Markdown reports organized by severity level
15
+ - Adds scan results to policy input for OPA policy enforcement
16
+ - Supports configurable additional arguments for filtering and customization
17
+
18
+ ## Configuration
19
+
20
+ ### Parameters
21
+
22
+ - **Additional Arguments**: Optional command-line arguments to pass to Checkov
23
+ (e.g., `--check HIGH,CRITICAL` or `--skip-check CKV_AWS_123`)
24
+
25
+ ### Severity Support
26
+
27
+ Severity levels (CRITICAL, HIGH, MEDIUM, LOW) are available when using Checkov
28
+ with a Bridgecrew/Prisma Cloud API key. To enable severity data:
29
+
30
+ ```
31
+ --bc-api-key YOUR_API_KEY
32
+ ```
33
+
34
+ Without an API key, the plugin still works but findings are not categorized by
35
+ severity in the report.
36
+
37
+ ## Usage
38
+
39
+ The plugin automatically runs after the plan phase and:
40
+
41
+ 1. Scans your Terraform/OpenTofu code with Checkov
42
+ 2. Reports failed security checks in a formatted Markdown report
43
+ 3. Organizes findings by severity level (CRITICAL, HIGH, MEDIUM, LOW) when available
44
+ 4. Provides check details, resource names, file locations, and remediation links
45
+ 5. Adds comprehensive scan data to policy input for OPA evaluation
46
+
47
+ ## Example OPA Policy
48
+
49
+ An example Plan policy is included that denies runs based on severity thresholds.
50
+ You can customize the max_critical, max_high, max_medium, and max_low values:
51
+
52
+ ```rego
53
+ package spacelift
54
+
55
+ import rego.v1
56
+
57
+ # Configure maximum allowed findings by severity
58
+ max_critical := 0
59
+ max_high := 0
60
+ max_medium := 50
61
+ max_low := 100
62
+
63
+ checkov_data := input.third_party_metadata.custom.checkov
64
+
65
+ deny contains sprintf("Found %d CRITICAL severity Checkov security checks", [checkov_data.summary.critical]) if {
66
+ checkov_data.summary.critical > max_critical
67
+ }
68
+
69
+ deny contains sprintf("Found %d HIGH severity Checkov security checks", [checkov_data.summary.high]) if {
70
+ checkov_data.summary.high > max_high
71
+ }
72
+ ```
73
+ author: Spacelift
74
+ labels:
75
+ - security
76
+ - terraform
6
77
  parameters:
7
78
  - name: Additional Arguments
8
79
  description: Additional command-line arguments to pass to Checkov (e.g., --check HIGH,CRITICAL or --skip-check CKV_AWS_123)
@@ -18,97 +89,95 @@ contexts:
18
89
  value_from_parameter: checkov_additional_args
19
90
  sensitive: false
20
91
  mounted_files:
21
- - path: /mnt/workspace/plugins/spaceforgeplugin/requirements.txt
92
+ - path: /mnt/workspace/plugins/checkov/requirements.txt
22
93
  content: |-
23
94
  checkov==3.2.489
24
95
  sensitive: false
25
- - path: /mnt/workspace/plugins/spaceforgeplugin/plugin.py
96
+ - path: /mnt/workspace/plugins/checkov/plugin.py
26
97
  content: |-
27
- """
28
- Checkov Security Scanner Plugin
29
-
30
- This plugin runs Checkov security scanning on Terraform/OpenTofu configurations
31
- during the after_plan hook and reports findings with detailed resource-level
32
- information.
98
+ import json
99
+ import os
33
100
 
34
- ## Features
101
+ from spaceforge import Context, Parameter, Policy, SpaceforgePlugin, Variable
35
102
 
36
- - Executes Checkov against Terraform/OpenTofu configurations
37
- - Parses and categorizes security findings by severity (when available)
38
- - Generates detailed Markdown reports organized by severity level
39
- - Adds scan results to policy input for OPA policy enforcement
40
- - Supports configurable additional arguments for filtering and customization
41
103
 
42
- ## Configuration
104
+ class CheckovPlugin(SpaceforgePlugin):
105
+ """
106
+ Checkov Security Scanner Plugin
43
107
 
44
- ### Parameters
108
+ This plugin runs Checkov security scanning on Terraform/OpenTofu configurations
109
+ during the after_plan hook and reports findings with detailed resource-level
110
+ information.
45
111
 
46
- - **Additional Arguments**: Optional command-line arguments to pass to Checkov
47
- (e.g., `--check HIGH,CRITICAL` or `--skip-check CKV_AWS_123`)
112
+ ## Features
48
113
 
49
- ### Severity Support
114
+ - Executes Checkov against Terraform/OpenTofu configurations
115
+ - Parses and categorizes security findings by severity (when available)
116
+ - Generates detailed Markdown reports organized by severity level
117
+ - Adds scan results to policy input for OPA policy enforcement
118
+ - Supports configurable additional arguments for filtering and customization
50
119
 
51
- Severity levels (CRITICAL, HIGH, MEDIUM, LOW) are available when using Checkov
52
- with a Bridgecrew/Prisma Cloud API key. To enable severity data:
120
+ ## Configuration
53
121
 
54
- ```
55
- --bc-api-key YOUR_API_KEY
56
- ```
122
+ ### Parameters
57
123
 
58
- Without an API key, the plugin still works but findings are not categorized by
59
- severity in the report.
124
+ - **Additional Arguments**: Optional command-line arguments to pass to Checkov
125
+ (e.g., `--check HIGH,CRITICAL` or `--skip-check CKV_AWS_123`)
60
126
 
61
- ## Usage
127
+ ### Severity Support
62
128
 
63
- The plugin automatically runs after the plan phase and:
129
+ Severity levels (CRITICAL, HIGH, MEDIUM, LOW) are available when using Checkov
130
+ with a Bridgecrew/Prisma Cloud API key. To enable severity data:
64
131
 
65
- 1. Scans your Terraform/OpenTofu code with Checkov
66
- 2. Reports failed security checks in a formatted Markdown report
67
- 3. Organizes findings by severity level (CRITICAL, HIGH, MEDIUM, LOW) when available
68
- 4. Provides check details, resource names, file locations, and remediation links
69
- 5. Adds comprehensive scan data to policy input for OPA evaluation
132
+ ```
133
+ --bc-api-key YOUR_API_KEY
134
+ ```
70
135
 
71
- ## Example OPA Policy
136
+ Without an API key, the plugin still works but findings are not categorized by
137
+ severity in the report.
72
138
 
73
- An example Plan policy is included that denies runs based on severity thresholds.
74
- You can customize the max_critical, max_high, max_medium, and max_low values:
139
+ ## Usage
75
140
 
76
- ```rego
77
- package spacelift
141
+ The plugin automatically runs after the plan phase and:
78
142
 
79
- import rego.v1
143
+ 1. Scans your Terraform/OpenTofu code with Checkov
144
+ 2. Reports failed security checks in a formatted Markdown report
145
+ 3. Organizes findings by severity level (CRITICAL, HIGH, MEDIUM, LOW) when available
146
+ 4. Provides check details, resource names, file locations, and remediation links
147
+ 5. Adds comprehensive scan data to policy input for OPA evaluation
80
148
 
81
- # Configure maximum allowed findings by severity
82
- max_critical := 0
83
- max_high := 0
84
- max_medium := 50
85
- max_low := 100
149
+ ## Example OPA Policy
86
150
 
87
- checkov_data := input.third_party_metadata.custom.checkov
151
+ An example Plan policy is included that denies runs based on severity thresholds.
152
+ You can customize the max_critical, max_high, max_medium, and max_low values:
88
153
 
89
- deny contains sprintf("Found %d CRITICAL severity Checkov security checks", [checkov_data.summary.critical]) if {
90
- checkov_data.summary.critical > max_critical
91
- }
154
+ ```rego
155
+ package spacelift
92
156
 
93
- deny contains sprintf("Found %d HIGH severity Checkov security checks", [checkov_data.summary.high]) if {
94
- checkov_data.summary.high > max_high
95
- }
96
- ```
97
- """
157
+ import rego.v1
98
158
 
99
- import json
100
- import os
159
+ # Configure maximum allowed findings by severity
160
+ max_critical := 0
161
+ max_high := 0
162
+ max_medium := 50
163
+ max_low := 100
101
164
 
102
- from spaceforge import Context, Parameter, Policy, SpaceforgePlugin, Variable
165
+ checkov_data := input.third_party_metadata.custom.checkov
103
166
 
104
- __plugin_name__ = "checkov"
105
- __author__ = "Spacelift"
106
- __version__ = "1.0.1"
107
- __labels__ = ["security", "terraform"]
167
+ deny contains sprintf("Found %d CRITICAL severity Checkov security checks", [checkov_data.summary.critical]) if {
168
+ checkov_data.summary.critical > max_critical
169
+ }
108
170
 
171
+ deny contains sprintf("Found %d HIGH severity Checkov security checks", [checkov_data.summary.high]) if {
172
+ checkov_data.summary.high > max_high
173
+ }
174
+ ```
175
+ """
109
176
 
110
- class CheckovPlugin(SpaceforgePlugin):
111
- """Checkov security scanner plugin for Spacelift."""
177
+ __plugin_name__ = "checkov"
178
+ __author__ = "Spacelift"
179
+ __version__ = "1.0.2"
180
+ __labels__ = ["security", "terraform"]
112
181
 
113
182
  __parameters__ = [
114
183
  Parameter(
@@ -371,13 +440,13 @@ contexts:
371
440
  self.logger.error(f"Plugin failed: {e}")
372
441
  exit(1)
373
442
  sensitive: false
374
- - path: /mnt/workspace/plugins/spaceforgeplugin/after_plan.sh
443
+ - path: /mnt/workspace/plugins/checkov/after_plan.sh
375
444
  content: |-
376
445
  #!/bin/sh
377
446
 
378
447
  set -e
379
448
 
380
- cd /mnt/workspace/plugins/spaceforgeplugin
449
+ cd /mnt/workspace/plugins/checkov
381
450
 
382
451
  if [ ! -d "./venv" ]; then
383
452
  python -m venv --system-site-packages ./venv
@@ -394,13 +463,13 @@ contexts:
394
463
  fi
395
464
 
396
465
  cd /mnt/workspace/source/$TF_VAR_spacelift_project_root
397
- python -m spaceforge run --plugin-file /mnt/workspace/plugins/spaceforgeplugin/plugin.py after_plan
466
+ python -m spaceforge run --plugin-file /mnt/workspace/plugins/checkov/plugin.py after_plan
398
467
  sensitive: false
399
468
  hooks:
400
469
  before_init:
401
- - mkdir -p /mnt/workspace/plugins/spaceforgeplugin
470
+ - mkdir -p /mnt/workspace/plugins/checkov
402
471
  after_plan:
403
- - chmod +x /mnt/workspace/plugins/spaceforgeplugin/after_plan.sh && /mnt/workspace/plugins/spaceforgeplugin/after_plan.sh
472
+ - chmod +x /mnt/workspace/plugins/checkov/after_plan.sh && /mnt/workspace/plugins/checkov/after_plan.sh
404
473
  policies:
405
474
  - name_prefix: checkov
406
475
  type: PLAN