Skip to content

Commit 0df0e18

Browse files
authored
Merge branch 'main' into feature/api-key-authorization-tests
2 parents fbd9914 + 8287225 commit 0df0e18

6 files changed

Lines changed: 34 additions & 32 deletions

File tree

.pre-commit-config.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ repos:
4141
- id: ruff
4242
- id: ruff-format
4343

44-
# https://github.com/renovatebot/pre-commit-hooks/issues/2621
45-
# This hook goes over the 250MiB limit that pre-commit.ci imposes
46-
# Disable unless a solution is found.
47-
# - repo: https://github.com/renovatebot/pre-commit-hooks
48-
# rev: 39.45.0
49-
# hooks:
50-
# - id: renovate-config-validator
51-
5244
- repo: https://github.com/gitleaks/gitleaks
5345
rev: v8.30.1
5446
hooks:
@@ -62,6 +54,18 @@ repos:
6254
exclude: ^(docs/|.*test.*\.py$|utilities/manifests/.*|utilities/plugins/tgis_grpc/.*)
6355

6456

57+
- repo: local
58+
hooks:
59+
- id: check-signoff
60+
name: Check Signed-off-by
61+
stages: [commit-msg]
62+
language: system
63+
entry: >
64+
bash -c 'grep -q "^Signed-off-by: .* <.*@.*>" "$1" ||
65+
{ echo "ERROR: Commit message must include a valid Signed-off-by trailer.";
66+
echo " Use: git commit -s";
67+
echo " Or add manually: Signed-off-by: Your Name <your@email.com>"; exit 1; }' --
68+
6569
- repo: https://github.com/espressif/conventional-precommit-linter
6670
rev: v1.11.0
6771
hooks:

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ RUN curl -sSL "https://github.com/fullstorydev/grpcurl/releases/download/v1.9.2/
2323
&& mv grpcurl /usr/bin/grpcurl
2424

2525
# Install cosign
26-
RUN curl -sSL "https://github.com/sigstore/cosign/releases/download/v2.4.2/cosign-linux-amd64" --output /usr/bin/cosign \
27-
&& chmod +x /usr/bin/cosign
26+
COPY --from=quay.io/securesign/cli-cosign@sha256:a8289d488491991d454a32784de19476f2c984917eb7a33b4544e55512f2747c /usr/local/bin/cosign /usr/bin/cosign
2827

2928
RUN useradd -ms /bin/bash $USER
3029
USER $USER

docs/GETTING_STARTED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ To run tests with admin client only, pass `--tc=use_unprivileged_client:False` t
138138
### jira integration
139139

140140
To skip running tests which have open bugs, [pytest_jira](https://github.com/rhevm-qe-automation/pytest_jira) plugin is used.
141-
To run tests with jira integration, you need to set `PYTEST_JIRA_URL`, `PYTEST_JIRA_USERNAME` and `PYTEST_JIRA_PASSWORD` environment variables.
141+
To run tests with jira integration, you need to set `PYTEST_JIRA_URL` and `PYTEST_JIRA_TOKEN` environment variables.
142142
To make a test with jira marker, add: `@pytest.mark.jira(jira_id="RHOAIENG-0000", run=False)` to the test.
143143

144144
### Running containerized tests

semgrep.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ rules:
810810
env:
811811
TITLE: ${{ github.event.pull_request.title }}
812812
patterns:
813-
- pattern-regex: 'run:\s*(?:[|>][-+]?)?[\s\S]*?\$\{\{\s*github\.(head_ref|event\.(issue|pull_request|discussion|review|review_comment|comment)\.(title|body|head\.ref|head\.label)|event\.head_commit\.message|event\.commits\[\d+\]\.message)\s*\}\}'
813+
- pattern-regex: 'run:\s*(?:[|>][-+]?\n(?:[ \t]+[^\n]*\n)*|[^\n]*)\$\{\{\s*github\.(head_ref|event\.(issue|pull_request|discussion|review|review_comment|comment)\.(title|body|head\.ref|head\.label)|event\.head_commit\.message|event\.commits\[\d+\]\.message)\s*\}\}'
814814
paths:
815815
include:
816816
- "**/.github/workflows/*.yml"
@@ -848,7 +848,7 @@ rules:
848848
- If checkout is needed, use merge commit: refs/pull/${{ github.event.number }}/merge
849849
- Add persist-credentials: false to limit token scope
850850
patterns:
851-
- pattern-regex: 'pull_request_target[\s\S]*?uses:\s*actions/checkout@[^\n]*\n(\s+\w+:.*\n)*\s+ref:\s*\$\{\{[^\}]*pull_request\.head\.(sha|ref)\s*\}\}'
851+
- pattern-regex: 'pull_request_target[\s\S]*?uses:\s*actions/checkout@[^\n]*\n(\s+[\w-]+:.*\n)*\s+ref:\s*\$\{\{[^\}]*pull_request\.head\.(sha|ref)\s*\}\}'
852852
paths:
853853
include:
854854
- "**/.github/workflows/*.yml"
@@ -1066,8 +1066,6 @@ rules:
10661066
$VAR := os.Getenv("...")
10671067
- pattern-not: |
10681068
var $VAR = os.Getenv("...")
1069-
- pattern-not: |
1070-
const $VAR = os.Getenv("...")
10711069
- pattern-not: |
10721070
$VAR, $_ := os.LookupEnv("...")
10731071
metadata:
@@ -1869,7 +1867,7 @@ rules:
18691867
Remediation: Always quote variables in file operations:
18701868
rm "$FILE" # correct
18711869
rm $FILE # dangerous
1872-
pattern-regex: '(rm|cp|mv|eval|chmod|chown|kill|pkill)\s+[^|;]*(?<!["''\\])\$[A-Za-z_][A-Za-z0-9_]*'
1870+
pattern-regex: '(rm|cp|mv|eval|chmod|chown|kill|pkill)\s+[^|;]*(?<!["''\\])\$(?:\{[A-Za-z_][A-Za-z0-9_]*(?:[:\-\+\?=][^}]*)?\}|[A-Za-z_][A-Za-z0-9_]*)'
18731871
metadata:
18741872
cwe: "CWE-78"
18751873
category: "security"

utilities/jira.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def get_jira_connection() -> JIRA:
2323
2424
"""
2525
return JIRA(
26-
basic_auth=(os.getenv("PYTEST_JIRA_USERNAME"), os.getenv("PYTEST_JIRA_PASSWORD")),
27-
options={"server": os.getenv("PYTEST_JIRA_URL")},
26+
server=os.getenv("PYTEST_JIRA_URL"),
27+
basic_auth=(os.getenv("PYTEST_JIRA_USERNAME"), os.getenv("PYTEST_JIRA_TOKEN")),
2828
)
2929

3030

uv.lock

Lines changed: 15 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)