pyrig-codeql 1.4.3__tar.gz → 1.4.13__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 (19) hide show
  1. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/PKG-INFO +1 -1
  2. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/pyproject.toml +1 -1
  3. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/pyproject.toml.orig +1 -1
  4. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/src/pyrig_codeql/rig/configs/version_control/remote/code_analyzer.py +4 -1
  5. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/src/pyrig_codeql/rig/configs/version_control/remote/workflows/health_check.py +36 -34
  6. pyrig_codeql-1.4.13/src/pyrig_codeql/rig/resources/CODEQL_ANALYZE_ACTION +3 -0
  7. pyrig_codeql-1.4.13/src/pyrig_codeql/rig/resources/CODEQL_INIT_ACTION +3 -0
  8. pyrig_codeql-1.4.3/src/pyrig_codeql/rig/resources/CODEQL_ANALYZE_ACTION +0 -3
  9. pyrig_codeql-1.4.3/src/pyrig_codeql/rig/resources/CODEQL_INIT_ACTION +0 -3
  10. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/LICENSE +0 -0
  11. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/README.md +0 -0
  12. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/src/pyrig_codeql/__init__.py +0 -0
  13. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/src/pyrig_codeql/py.typed +0 -0
  14. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/src/pyrig_codeql/rig/__init__.py +0 -0
  15. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/src/pyrig_codeql/rig/configs/__init__.py +0 -0
  16. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/src/pyrig_codeql/rig/configs/version_control/__init__.py +0 -0
  17. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/src/pyrig_codeql/rig/configs/version_control/remote/__init__.py +0 -0
  18. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/src/pyrig_codeql/rig/configs/version_control/remote/workflows/__init__.py +0 -0
  19. {pyrig_codeql-1.4.3 → pyrig_codeql-1.4.13}/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.4.3
3
+ Version: 1.4.13
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.4.3"
3
+ version = "1.4.13"
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.4.3"
3
+ version = "1.4.13"
4
4
  description = "A pyrig plugin that integrates GitHub CodeQL."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -1,7 +1,7 @@
1
1
  """CodeQL configuration that restricts analysis to shipped source code."""
2
2
 
3
3
  from pathlib import Path
4
- from typing import Any
4
+ from typing import Any, override
5
5
 
6
6
  from pyrig.rig.configs.base.yaml import YMLDictConfigFile
7
7
  from pyrig.rig.tools.testing.project import ProjectTester
@@ -16,14 +16,17 @@ class CodeAnalyzerConfigFile(YMLDictConfigFile):
16
16
  Manages `.github/codeql.yml`, including the query suite and ignored paths.
17
17
  """
18
18
 
19
+ @override
19
20
  def parent_path(self) -> Path:
20
21
  """Return GitHub's special repository configuration directory."""
21
22
  return RemoteVersionController.I.config_dir()
22
23
 
24
+ @override
23
25
  def stem(self) -> str:
24
26
  """Return `'codeql'`."""
25
27
  return "codeql"
26
28
 
29
+ @override
27
30
  def _configs(self) -> dict[str, Any]:
28
31
  """Build the CodeQL configuration.
29
32
 
@@ -1,7 +1,7 @@
1
1
  """Health check workflow extended with CodeQL analysis and an open-alert gate."""
2
2
 
3
3
  from types import MethodType
4
- from typing import Any
4
+ from typing import Any, override
5
5
 
6
6
  from pyrig.rig.configs.version_control.remote.workflows.health_check import (
7
7
  HealthCheckWorkflowConfigFile as BaseHealthCheckWorkflowConfigFile,
@@ -17,17 +17,7 @@ from pyrig_codeql.rig.configs.version_control.remote.code_analyzer import (
17
17
  class HealthCheckWorkflowConfigFile(BaseHealthCheckWorkflowConfigFile):
18
18
  """Add CodeQL analysis and an open-alert gate to the health check workflow."""
19
19
 
20
- def jobs(self) -> dict[str, Any]:
21
- """Return the base class's jobs, extended with the CodeQL analysis job.
22
-
23
- Returns:
24
- The base class jobs plus the CodeQL analysis job.
25
- """
26
- return {
27
- **self.job_analyze(),
28
- **super().jobs(),
29
- }
30
-
20
+ @override
31
21
  def job_health_check_needs(self) -> tuple[MethodType, ...]:
32
22
  """Return the upstream jobs required before the aggregate job runs.
33
23
 
@@ -39,6 +29,18 @@ class HealthCheckWorkflowConfigFile(BaseHealthCheckWorkflowConfigFile):
39
29
  """
40
30
  return (self.job_analyze, *super().job_health_check_needs())
41
31
 
32
+ @override
33
+ def jobs(self) -> dict[str, Any]:
34
+ """Return the base class's jobs, extended with the CodeQL analysis job.
35
+
36
+ Returns:
37
+ The base class jobs plus the CodeQL analysis job.
38
+ """
39
+ return {
40
+ **self.job_analyze(),
41
+ **super().jobs(),
42
+ }
43
+
42
44
  def job_analyze(self) -> dict[str, Any]:
43
45
  """Return the CodeQL analysis job.
44
46
 
@@ -74,24 +76,6 @@ class HealthCheckWorkflowConfigFile(BaseHealthCheckWorkflowConfigFile):
74
76
  self.step_check_alerts(),
75
77
  ]
76
78
 
77
- def step_initialize_codeql(self) -> dict[str, Any]:
78
- """Build a step that initializes the CodeQL database.
79
-
80
- Neither analyzed language is compiled, so no build step is
81
- required between initialization and analysis.
82
-
83
- Returns:
84
- Step using `github/codeql-action/init@<ref>`.
85
- """
86
- return self.step(
87
- self.step_initialize_codeql,
88
- uses=self.codeql_init_action(),
89
- with_={
90
- "languages": self.insert_expression("matrix.language"),
91
- "config-file": CodeAnalyzerConfigFile.I.path().as_posix(),
92
- },
93
- )
94
-
95
79
  def step_analyze_code(self) -> dict[str, Any]:
96
80
  """Build a step that runs the CodeQL analysis and uploads results.
97
81
 
@@ -122,13 +106,23 @@ class HealthCheckWorkflowConfigFile(BaseHealthCheckWorkflowConfigFile):
122
106
  env={"GH_TOKEN": self.insert_expression("secrets.GITHUB_TOKEN")},
123
107
  )
124
108
 
125
- def codeql_init_action(self) -> tuple[str, str, str]:
126
- """Return action metadata for `github/codeql-action/init`.
109
+ def step_initialize_codeql(self) -> dict[str, Any]:
110
+ """Build a step that initializes the CodeQL database.
111
+
112
+ Neither analyzed language is compiled, so no build step is
113
+ required between initialization and analysis.
127
114
 
128
115
  Returns:
129
- Tuple of action name, pinned commit SHA, and release tag.
116
+ Step using `github/codeql-action/init@<ref>`.
130
117
  """
131
- return self.action_from_resource(self.codeql_init_action, resources)
118
+ return self.step(
119
+ self.step_initialize_codeql,
120
+ uses=self.codeql_init_action(),
121
+ with_={
122
+ "languages": self.insert_expression("matrix.language"),
123
+ "config-file": CodeAnalyzerConfigFile.I.path().as_posix(),
124
+ },
125
+ )
132
126
 
133
127
  def codeql_analyze_action(self) -> tuple[str, str, str]:
134
128
  """Return action metadata for `github/codeql-action/analyze`.
@@ -137,3 +131,11 @@ class HealthCheckWorkflowConfigFile(BaseHealthCheckWorkflowConfigFile):
137
131
  Tuple of action name, pinned commit SHA, and release tag.
138
132
  """
139
133
  return self.action_from_resource(self.codeql_analyze_action, resources)
134
+
135
+ def codeql_init_action(self) -> tuple[str, str, str]:
136
+ """Return action metadata for `github/codeql-action/init`.
137
+
138
+ Returns:
139
+ Tuple of action name, pinned commit SHA, and release tag.
140
+ """
141
+ return self.action_from_resource(self.codeql_init_action, resources)
@@ -0,0 +1,3 @@
1
+ github/codeql-action/analyze
2
+ 9b3254085494b55a0f7c4c2b3d2d52cc712ce370
3
+ v4.39.1
@@ -0,0 +1,3 @@
1
+ github/codeql-action/init
2
+ 9b3254085494b55a0f7c4c2b3d2d52cc712ce370
3
+ v4.39.1
@@ -1,3 +0,0 @@
1
- github/codeql-action/analyze
2
- 6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee
3
- v4.39.0
@@ -1,3 +0,0 @@
1
- github/codeql-action/init
2
- 6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee
3
- v4.39.0
File without changes
File without changes