pyrig-codeql 1.5.2__tar.gz → 1.6.4__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.4}/PKG-INFO +2 -2
  2. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/pyproject.toml +2 -2
  3. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/pyproject.toml.orig +2 -2
  4. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/rig/configs/version_control/remote/workflows/health_check.py +25 -14
  5. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/LICENSE +0 -0
  6. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/README.md +0 -0
  7. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/__init__.py +0 -0
  8. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/py.typed +0 -0
  9. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/rig/__init__.py +0 -0
  10. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/rig/configs/__init__.py +0 -0
  11. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/rig/configs/version_control/__init__.py +0 -0
  12. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/rig/configs/version_control/remote/__init__.py +0 -0
  13. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/rig/configs/version_control/remote/code_analyzer.py +0 -0
  14. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/rig/configs/version_control/remote/workflows/__init__.py +0 -0
  15. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/rig/resources/CODEQL_ANALYZE_ACTION +0 -0
  16. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/src/pyrig_codeql/rig/resources/CODEQL_INIT_ACTION +0 -0
  17. {pyrig_codeql-1.5.2 → pyrig_codeql-1.6.4}/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.4
4
4
  Summary: A pyrig plugin that integrates GitHub CodeQL.
5
5
  Keywords: pyrig
6
6
  Author: Winipedia
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.13
14
14
  Classifier: Programming Language :: Python :: 3.14
15
15
  Classifier: Programming Language :: Python :: 3.15
16
16
  Classifier: Typing :: Typed
17
- Requires-Dist: pyrig>=19.2.0
17
+ Requires-Dist: pyrig>=19.9.0
18
18
  Maintainer: Winipedia
19
19
  Maintainer-email: Winipedia <winipedia@gmx.de>
20
20
  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.4"
4
4
  description = "A pyrig plugin that integrates GitHub CodeQL."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Programming Language :: Python :: 3.15",
17
17
  "Typing :: Typed",
18
18
  ]
19
- dependencies = ["pyrig>=19.2.0"]
19
+ dependencies = ["pyrig>=19.9.0"]
20
20
 
21
21
  [[project.authors]]
22
22
  name = "Winipedia"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyrig-codeql"
3
- version = "1.5.2"
3
+ version = "1.6.4"
4
4
  description = "A pyrig plugin that integrates GitHub CodeQL."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -27,7 +27,7 @@ classifiers = [
27
27
  "Typing :: Typed",
28
28
  ]
29
29
  dependencies = [
30
- "pyrig>=19.2.0",
30
+ "pyrig>=19.9.0",
31
31
  ]
32
32
 
33
33
  [project.urls]
@@ -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
- """Return the base class's jobs, extended with the CodeQL analysis job.
34
+ def jobs(self) -> tuple[Callable[[], dict[str, Any]], ...]:
35
+ """Return the base job builders, extended with the CodeQL analysis builder.
35
36
 
36
37
  Returns:
37
- The base class jobs plus the CodeQL analysis job.
38
+ Tuple of the CodeQL analysis builder followed by the base job builders.
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