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.
Files changed (17) hide show
  1. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/PKG-INFO +1 -1
  2. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/pyproject.toml +1 -1
  3. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/pyproject.toml.orig +1 -1
  4. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/remote/workflows/health_check.py +23 -12
  5. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/LICENSE +0 -0
  6. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/README.md +0 -0
  7. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/__init__.py +0 -0
  8. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/py.typed +0 -0
  9. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/__init__.py +0 -0
  10. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/__init__.py +0 -0
  11. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/__init__.py +0 -0
  12. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/remote/__init__.py +0 -0
  13. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/remote/code_analyzer.py +0 -0
  14. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/configs/version_control/remote/workflows/__init__.py +0 -0
  15. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/resources/CODEQL_ANALYZE_ACTION +0 -0
  16. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/resources/CODEQL_INIT_ACTION +0 -0
  17. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.0}/src/pyrig_codeql/rig/resources/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyrig-codeql
3
- Version: 1.5.2
3
+ Version: 1.6.0
4
4
  Summary: A pyrig plugin that integrates GitHub CodeQL.
5
5
  Keywords: pyrig
6
6
  Author: Winipedia
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyrig-codeql"
3
- version = "1.5.2"
3
+ version = "1.6.0"
4
4
  description = "A pyrig plugin that integrates GitHub CodeQL."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyrig-codeql"
3
- version = "1.5.2"
3
+ version = "1.6.0"
4
4
  description = "A pyrig plugin that integrates GitHub CodeQL."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -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
- **self.job_analyze(),
41
- **super().jobs(),
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 needed to analyze code, upload results, and read
50
- alerts, and steps that fail the job on open CodeQL alerts.
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