pyrig-codeql 1.5.2__tar.gz → 1.6.0__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.
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/PKG-INFO +1 -1
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/pyproject.toml +1 -1
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/pyproject.toml.orig +1 -1
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/remote/workflows/health_check.py +23 -12
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/LICENSE +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/README.md +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/__init__.py +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/py.typed +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/__init__.py +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/__init__.py +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/__init__.py +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/remote/__init__.py +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/remote/code_analyzer.py +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/remote/workflows/__init__.py +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/resources/CODEQL_ANALYZE_ACTION +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/resources/CODEQL_INIT_ACTION +0 -0
- {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/resources/__init__.py +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Health check workflow extended with CodeQL analysis and an open-alert gate."""
|
|
2
2
|
|
|
3
|
+
from collections.abc import Callable
|
|
3
4
|
from types import MethodType
|
|
4
5
|
from typing import Any, override
|
|
5
6
|
|
|
@@ -30,39 +31,49 @@ class HealthCheckWorkflowConfigFile(BaseHealthCheckWorkflowConfigFile):
|
|
|
30
31
|
return (self.job_analyze, *super().job_health_check_needs())
|
|
31
32
|
|
|
32
33
|
@override
|
|
33
|
-
def jobs(self) -> dict[str, Any]:
|
|
34
|
+
def jobs(self) -> tuple[Callable[[], dict[str, Any]], ...]:
|
|
34
35
|
"""Return the base class's jobs, extended with the CodeQL analysis job.
|
|
35
36
|
|
|
36
37
|
Returns:
|
|
37
38
|
The base class jobs plus the CodeQL analysis job.
|
|
38
39
|
"""
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
return (
|
|
41
|
+
self.job_analyze,
|
|
42
|
+
*super().jobs(),
|
|
43
|
+
)
|
|
43
44
|
|
|
44
45
|
def job_analyze(self) -> dict[str, Any]:
|
|
45
46
|
"""Return the CodeQL analysis job.
|
|
46
47
|
|
|
47
48
|
Returns:
|
|
48
49
|
Job configuration with a matrix over `("python", "actions")`,
|
|
49
|
-
the permissions
|
|
50
|
-
|
|
50
|
+
the job's permissions, and steps that fail the job on open
|
|
51
|
+
CodeQL alerts.
|
|
51
52
|
"""
|
|
52
53
|
return self.job(
|
|
53
54
|
self.job_analyze,
|
|
54
55
|
strategy=self.strategy_matrix(
|
|
55
56
|
matrix=self.matrix({"language": ["python", "actions"]}),
|
|
56
57
|
),
|
|
57
|
-
permissions=
|
|
58
|
-
**self.permission_contents(),
|
|
59
|
-
**self.permission("actions"),
|
|
60
|
-
**self.permission("security-events", write=True),
|
|
61
|
-
},
|
|
58
|
+
permissions=self.job_analyze_permissions(),
|
|
62
59
|
steps=self.steps_analyze(),
|
|
63
60
|
timeout_minutes=90,
|
|
64
61
|
)
|
|
65
62
|
|
|
63
|
+
def job_analyze_permissions(self) -> dict[str, Any]:
|
|
64
|
+
"""Return the permissions for the CodeQL analysis job.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
Permissions needed to analyze code (`contents: read`), read
|
|
68
|
+
workflow runs (`actions: read`), and upload results and read
|
|
69
|
+
alerts (`security-events: write`).
|
|
70
|
+
"""
|
|
71
|
+
return {
|
|
72
|
+
**self.permission_contents(),
|
|
73
|
+
**self.permission("actions"),
|
|
74
|
+
**self.permission("security-events", write=True),
|
|
75
|
+
}
|
|
76
|
+
|
|
66
77
|
def steps_analyze(self) -> list[dict[str, Any]]:
|
|
67
78
|
"""Return the steps for the CodeQL analysis job.
|
|
68
79
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/resources/CODEQL_ANALYZE_ACTION
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|