Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

ci(typescript-sdk): pin the three floating actions by SHA

thread3dda051713a1f4
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c97f733d..cdc93339 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -380,13 +380,13 @@ jobs:
matrix:
node: [22, 24]
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v4
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: sdk/typescript/package-lock.json
- - uses: actions/setup-python@v5
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
cache: pip
diff --git a/tests/test_packaging.py b/tests/test_packaging.py
index f7ab2abd..1ae3cd2d 100644
--- a/tests/test_packaging.py
+++ b/tests/test_packaging.py
@@ -96,6 +96,22 @@ missing_from_ci = [
]
check("ci/tests every advertised Python version", missing_from_ci, [])
+# ------------------------------------------------- workflows pin every action by a full SHA
+# `.github/dependabot.yml` states the policy, and every job but `typescript-sdk` followed it. That
+# job runs `npm ci` and starts a live server, so a moved major tag executes in a privileged job --
+# the supply-chain risk the pins exist to remove. Enforced here so the next `uses:` cannot float.
+_workflow_dir = os.path.join(ROOT, ".github", "workflows")
+_unpinned = []
+for _wf_name in sorted(os.listdir(_workflow_dir)):
+ if not _wf_name.endswith((".yml", ".yaml")):
+ continue
+ _wf_text = read(os.path.join(".github", "workflows", _wf_name))
+ for _line_no, _line in enumerate(_wf_text.splitlines(), 1):
+ _uses = re.search(r"\buses:\s*(\S+)", _line)
+ if _uses and not re.fullmatch(r"[^@\s]+@[0-9a-f]{40}", _uses.group(1)):
+ _unpinned.append("%s:%d %s" % (_wf_name, _line_no, _uses.group(1)))
+check("workflows/pin every action by SHA", _unpinned, [])
+
# Every test in tests/ must be wired into CI workflows (ci.yml or docker.yml),
# unless explicitly exempted with a documented rationale (#399).
def _clean_command_line(line):