Compare commits

..

3 Commits

Author SHA1 Message Date
peptiderepo
8024d4c89d docs: add v1.7.2 changelog entry
Agent-Session: smoke-playwright-nodeps-20260617
2026-06-17 11:50:21 +07:00
peptiderepo
f0397f1c50 chore: bump version to 1.7.2
Agent-Session: smoke-playwright-nodeps-20260617
2026-06-17 11:50:08 +07:00
peptiderepo
5d05716d71 fix(ci): drop --with-deps from playwright install on self-hosted runner
The VPS runner (peptide-vps) has OS-level Playwright deps pre-installed by
root. --with-deps triggers apt-get which requires sudo, blocked by the
runner's NoNewPrivileges systemd hardening. Drop the flag; Playwright's
binary-only install succeeds as ghrunner with no elevated privileges.

SSH-verified: npx playwright install chromium succeeds for ghrunner user;
Chromium 149.0.7827.55 downloaded to /home/ghrunner/.cache/ms-playwright.

Bump: v1.7.1 → v1.7.2

Agent-Session: smoke-playwright-nodeps-20260617
2026-06-17 11:50:00 +07:00
3 changed files with 5 additions and 18 deletions

View File

@@ -22,7 +22,7 @@ jobs:
- uses: actions/github-script@v7
with:
script: |
const owner = 'peptide-repo';
const owner = 'peptiderepo';
const repos = [
'prautoblogger','peptide-repo-core','peptide-search-ai',
'peptide-news-plugin','peptide-reconstitution-calculator','peptide-starter-theme'

View File

@@ -53,7 +53,6 @@ jobs:
run: npm ci
- name: Install Playwright browsers
# OS deps pre-installed on the self-hosted runner host; --with-deps needs sudo which the sandbox blocks
run: npx playwright install chromium
- name: Run smoke tests

View File

@@ -34,11 +34,7 @@
* The stored OpenRouter key must NEVER appear in page source.
* #prv_api_key renders with value="" on every page load regardless of
* whether a key is stored. This spec asserts the empty value and asserts
* that no structurally valid key token (regex /sk-or-v1-[A-Za-z0-9]{20,}/)
* appears in the full body HTML. A regex is used instead of a naive
* toContain('sk-or-') to avoid a false-positive on the password input's
* placeholder="sk-or-…" attribute (the ellipsis is a format hint, not a
* token body, and won't match the regex).
* that known API key prefixes ("sk-or-") are absent from the full body.
*
* @see peptiderepo/pr-vision includes/core/class-prv-admin-page.php
* @see peptiderepo/pr-vision includes/core/class-prv-settings-page.php
@@ -174,18 +170,10 @@ test.describe('WP Admin - PR Vision Settings page (API-key-manager)', () => {
const inputValue = await keyInput.getAttribute('value');
expect(inputValue ?? '').toBe('');
// Security check: a *real* OpenRouter key (format "sk-or-v1-<20+ alnum chars>")
// must not appear anywhere in the page HTML -- guards against accidental
// server-side leakage.
//
// NOTE: We use a regex rather than the naive toContain('sk-or-') to avoid
// a false-positive: the password input carries placeholder="sk-or-…"
// (an ellipsis format-hint, not a token body) which contains the literal
// string "sk-or-" but is NOT a leaked key. A regex that requires the
// "v1-" segment and at least 20 alphanumeric characters only matches a
// structurally valid key, so the placeholder never trips it.
// Security check: known OpenRouter key prefixes must not appear anywhere in
// the page HTML -- guards against accidental server-side leakage.
const html = await page.content();
expect(html).not.toMatch(/sk-or-v1-[A-Za-z0-9]{20,}/);
expect(html).not.toContain('sk-or-');
});
});