Commit graph

46 commits

Author SHA1 Message Date
Loup-Garou911XD
3e0dfccea6
fix a loophole 2026-08-15 15:36:27 +05:30
Loup-Garou911XD
44cffc5cb5
Make plugin metadata idempotent by comparing against the base branch
auto_apply_plugin_metadata.py asked "what version is already released?" by
reading the category manifest out of the PR's own working tree. Once
ci-apply.yml has pushed its "[ci] apply-plugin-metadata-and-formatting"
commit back to the PR branch, that tree already lists the version being
added - so the check compared the new version against itself and raised
"Version cant be lower or equal than the previous version."

That fires on every re-run of PR Check: the one ci-apply.yml's own push
triggers, and any run caused by a contributor pushing a follow-up commit.

Published state now comes from the base branch instead, read with
`git show $PLUGMAN_BASE_REF:<manifest>` (ci-check.yml supplies the PR base
sha; local runs fall back to origin/main, then to the working tree). The
writer is idempotent to match: a version entry that is already stamped and
still matches the plugin's md5sum is left alone rather than reset to null.

An entry whose md5sum has drifted is still reset, which implements the TODO
this replaces - a contributor can keep iterating on an unpublished version
during review without bumping it every round. Bump enforcement against
published versions is unchanged.

Version comparison and ordering switch to the existing
get_comparable_version_tuple_from_string; versioning_tools.semantic_to_str
ordered 1.0.10 below 1.0.9 and silently truncated 3-digit components.
2026-08-10 13:30:20 +05:30
Loup-Garou911XD
bc5c5aafc8
Split ci.yml to close a pull_request_target pwn-request hole
pull_request_target checked out fork PR branches with the repo's
write-scoped GITHUB_TOKEN and ran autopep8/metadata scripts/tests
against that fork content, letting a malicious PR rewrite test/*.py
for arbitrary code execution with push access and secrets. It's also
been failing outright for weeks since actions/checkout now blocks
unsafe fork checkouts here without explicit opt-in.

Split into ci-check.yml (plain pull_request, GitHub's read-only
no-secrets token, safe to run fork code) which uploads a diff
artifact, and ci-apply.yml (workflow_run, privileged) which only
applies that diff via `git apply`, never executing fork content.
ci.yml keeps just the push-to-main job as the strict integrity check.

Because GitHub runs the PR's own copy of ci-check.yml for
pull_request events, that artifact is attacker-authored: ci-apply.yml
therefore resolves PR identity from the workflow_run payload plus the
API rather than the artifact, passes every dynamic value through env:
instead of ${{ }} in run: blocks (which the runner substitutes before
the shell parses, so quotes don't contain it), and validates branch,
repo, sha and PR-number shapes before use. The patch itself stays
untrusted input: allowlist-validated and applied only to the fork's
own branch.

test_checks.py adds an env-gated lenient mode so ci-check.yml's
preview run doesn't fail on a brand-new plugin's not-yet-existing
commit sha, while history and push-to-main stay strict.
2026-08-09 22:56:49 +05:30
Loup-Garou911XD
8581ea3093 ci fix 2026-01-26 03:02:35 +05:30
Loup-Garou911XD
c096985e94 autometa commit 2026-01-10 18:49:07 +05:30
Loup-Garou911XD
a93fda3a85 replaced deprecated methods 2025-01-25 17:47:38 +05:30
Loup-Garou911XD
dfe63daefb ci workflow update 2025-01-24 02:56:09 +05:30
Loup-Garou911XD
9c1ff8b0f2 Updated ci and release workflow 2025-01-15 04:15:39 +05:30
Loup
7b61d12cbe
Update release.yml to run only on main branch 2024-04-22 23:13:13 +05:30
Loup-Garou911XD
8d1a55f76d Fix release workflow failing because of multiline changelog 2024-04-22 19:01:11 +05:30
Loup-Garou911XD
281459cac1 Updated actiont to run on commit 2024-04-20 08:50:20 +05:30
Loup-Garou911XD
9377afe5b6 removed workflow dispatch 2024-04-20 02:53:09 +05:30
Loup-Garou911XD
8f4f7e46a3 uhmm 2024-04-20 02:50:02 +05:30
Loup-Garou911XD
01a564f736 Added workflow dispatch run to release workflow 2024-04-20 02:49:07 +05:30
Loup-Garou911XD
9541a5971c Improvements 2024-04-20 00:33:00 +05:30
Loup-Garou911XD
ca50f0a9af Fix3 2024-04-20 00:21:04 +05:30
Loup-Garou911XD
54b049ac22 Fix2 2024-04-20 00:19:05 +05:30
Loup-Garou911XD
afacc49152 Fix 2024-04-20 00:10:10 +05:30
Loup-Garou911XD
d07a276f1a get changes from CHANGELOG.md 2024-04-20 00:04:05 +05:30
Loup-Garou911XD
20aef6312a added release workflow 2024-04-19 22:27:30 +05:30
Rikko
1d50d58119 Pin pycodestyle version 2023-08-03 20:50:27 +05:30
Rikko
cc616c6160 Don't use cached dependencies? 2023-08-03 20:43:11 +05:30
Rikko
8a558e6a29 Update autopep8 version 2023-08-03 20:17:18 +05:30
Rikko
07bffac8d1 Use python 3.11 with ci 2023-06-21 00:25:43 +05:30
Rikko
2b4d6df5dc Lock autopep8 to 2.0.0 2022-12-17 20:16:59 +05:30
Rikko
6998dedead Release v0.1.5 2022-09-08 01:27:21 +05:30
Rikko
805b99a86f Enable pull request target, pushes on only main branch 2022-09-01 16:42:42 +05:30
Rikko
890fdc03f5 Try CI without pull request target 2022-08-31 23:03:20 +05:30
Rikko
ccdc259a03 Rename a workflow step 2022-08-31 21:26:12 +05:30
Rikko
d4b248b0cc checks.yml -> ci.yml 2022-08-31 21:21:50 +05:30
Rikko
793cf9b40c Apply diff commits for formatting and versioning 2022-08-31 20:48:22 +05:30
Rikko
a131a209c7 Update hashes 2022-08-31 19:49:46 +05:30
Rikko
ec9f1e1b71 Auto apply version metadata fixes 2022-08-31 19:23:20 +05:30
Rikko
f29008acdb Auto apply version metadata 2022-08-31 15:58:19 +05:30
Rikko
0fc1c8a274 Remove redundant ci actions 2022-08-31 06:32:58 +05:30
Rikko
4110d2bd15 verbose CI, fetch entire git history 2022-08-31 06:30:07 +05:30
Vishal
5981bef63c
Now checks will work when someone creates a Pull Request 2022-08-30 18:29:00 +05:30
Rikko
74ca172fe6 Have a separate GH action for tests 2022-08-29 22:39:09 +05:30
Rikko
3f177bd27e Add tests 2022-08-29 22:31:28 +05:30
Vishal
8edc8c087a
Update MetaData.yml 2022-08-04 22:53:13 +05:30
Vishal
2ab9fcc887
New Workflow 2022-08-03 22:06:22 +05:30
Rikko
cc29e6f8bc Output filename before performing analysis 2022-06-14 23:13:43 +05:30
Rikko
46b5c2ee26 Install dependencies as superuser 2022-06-14 23:02:33 +05:30
Rikko
ef8f14e235 Index files, sample plugin 2022-06-14 23:00:51 +05:30
Rikko
74721d6fd7 Create mod-analyze.yml 2022-06-14 22:13:19 +05:30
Rikko
701efd9da5
Create pylint.yml 2022-06-14 22:03:32 +05:30