Compare commits
5 Commits
claude/prv
...
claude/ado
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
496993e24f | ||
|
|
2810c61060 | ||
|
|
c84ab59b7b | ||
|
|
166c5d4caf | ||
|
|
01a9356c16 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -14,7 +14,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
uses: peptide-repo/peptide-e2e/.github/workflows/ci.yml@main
|
uses: peptiderepo/peptide-e2e/.github/workflows/ci.yml@main
|
||||||
with:
|
with:
|
||||||
tests: stubs
|
tests: stubs
|
||||||
has_js: false
|
has_js: false
|
||||||
|
|||||||
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
name: Deploy (shared pipeline)
|
name: Deploy (shared pipeline)
|
||||||
needs: test
|
needs: test
|
||||||
uses: peptide-repo/peptide-e2e/.github/workflows/deploy-app.yml@main
|
uses: peptiderepo/peptide-e2e/.github/workflows/deploy-app.yml@main
|
||||||
with:
|
with:
|
||||||
target_path: wp-content/plugins/pr-vision
|
target_path: wp-content/plugins/pr-vision
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
38
CHANGELOG.md
38
CHANGELOG.md
@@ -7,44 +7,6 @@ Versioning: [Semantic Versioning](https://semver.org/)
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## [0.3.3] — 2026-06-19
|
|
||||||
|
|
||||||
P1 security fix: write-only key invariant — remove key-format prefix from placeholder.
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **[SECURITY] P1 — API-key input placeholder leaked provider prefix in rendered HTML.**
|
|
||||||
`class-prv-key-manager-renderer.php` rendered `placeholder="sk-or-…"` on the
|
|
||||||
password input. The placeholder contained the literal string `sk-or-` which (a)
|
|
||||||
exposes provider-format information to anyone who can view page source, and (b)
|
|
||||||
caused the `not.toContain('sk-or-')` smoke-suite assertion to fail (confirmed in
|
|
||||||
CI run on 2026-06-17, job 81824705096). The placeholder is now `Paste provider API
|
|
||||||
key` — neutral, no key-format prefix, no provider information. The `value=""` write-
|
|
||||||
only invariant was already correct; this fixes the remaining output surface.
|
|
||||||
- Added inline comment and docblock note: placeholder text must never contain a
|
|
||||||
key-format prefix — even a format hint in a placeholder violates the write-only
|
|
||||||
contract and trips smoke-suite security guards.
|
|
||||||
|
|
||||||
### Audit
|
|
||||||
Full-codebase audit performed (2026-06-19):
|
|
||||||
- `class-prv-settings-renderer.php` — no key emission; clean.
|
|
||||||
- `class-prv-key-manager-renderer.php` — placeholder was the sole leak; now fixed.
|
|
||||||
- `class-prv-model-manager-table.php` — no key fields; clean.
|
|
||||||
- `class-prv-settings-controller.php` — processes POST input; never reflects back.
|
|
||||||
- `class-prv-key-store.php` — `get_key()` used server-side only; never echoed.
|
|
||||||
- `class-prv-crypto-helper.php` — encrypt/decrypt helper; no HTML output.
|
|
||||||
- `class-prv-key-test-ajax.php` — AJAX; returns valid/invalid message, never the key.
|
|
||||||
- `class-prv-model-test-ajax.php` — AJAX; returns model health, never the key.
|
|
||||||
- `class-prv-gateway-client.php` — HTTP client; key only in Authorization header.
|
|
||||||
- `class-prv-probe-run-executor.php` — `error_log()` only logs HTTP status, not the key.
|
|
||||||
- `class-prv-capture-writer.php` — allowlisted fields; no key fields.
|
|
||||||
- `class-prv-call-drawer-renderer.php` / `class-prv-call-log-*` — no key fields.
|
|
||||||
- All providers — `get_key()` only flows to HTTP Authorization header.
|
|
||||||
- No `wp_localize_script` calls anywhere in the plugin.
|
|
||||||
- No REST endpoints registered; no REST response surfaces.
|
|
||||||
- No data attributes containing key fields.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## [0.3.2] — 2026-06-16
|
## [0.3.2] — 2026-06-16
|
||||||
|
|
||||||
CI/CD adoption: PHPUnit test suite (WP stubs), estate reusable pipeline,
|
CI/CD adoption: PHPUnit test suite (WP stubs), estate reusable pipeline,
|
||||||
|
|||||||
@@ -12,10 +12,7 @@ declare(strict_types=1);
|
|||||||
*
|
*
|
||||||
* Outputs only the key SOURCE (constant / admin / not set) and the
|
* Outputs only the key SOURCE (constant / admin / not set) and the
|
||||||
* last-run API status. The stored key value is NEVER included in any
|
* last-run API status. The stored key value is NEVER included in any
|
||||||
* output: not in HTML, not in JS, not in data attributes. The password
|
* output: not in HTML, not in JS, not in data attributes.
|
||||||
* input placeholder must also never contain a key format prefix (e.g.
|
|
||||||
* 'sk-or-') — even a format hint in the placeholder leaks provider
|
|
||||||
* information and trips write-only security guards.
|
|
||||||
*
|
*
|
||||||
* Three states:
|
* Three states:
|
||||||
* - SOURCE_CONSTANT: constant defined → lock the input, show note.
|
* - SOURCE_CONSTANT: constant defined → lock the input, show note.
|
||||||
@@ -123,13 +120,10 @@ class PRV_Key_Manager_Renderer {
|
|||||||
echo '</label>';
|
echo '</label>';
|
||||||
|
|
||||||
// Input always renders empty — never outputs stored key.
|
// Input always renders empty — never outputs stored key.
|
||||||
// Placeholder must not include a key-format prefix (e.g. 'sk-or-');
|
|
||||||
// even a format hint leaks provider information and will trip
|
|
||||||
// write-only security assertions in the smoke suite.
|
|
||||||
echo '<input type="password" id="prv_api_key" name="prv_api_key" '
|
echo '<input type="password" id="prv_api_key" name="prv_api_key" '
|
||||||
. 'class="prv-input" style="max-width:420px" '
|
. 'class="prv-input" style="max-width:420px" '
|
||||||
. 'value="" autocomplete="new-password" '
|
. 'value="" autocomplete="new-password" '
|
||||||
. 'placeholder="' . esc_attr( $is_const ? __( 'Managed via wp-config — cannot override', 'pr-vision' ) : __( 'Paste provider API key', 'pr-vision' ) ) . '"'
|
. 'placeholder="' . esc_attr( $is_const ? __( 'Managed via wp-config — cannot override', 'pr-vision' ) : __( 'sk-or-…', 'pr-vision' ) ) . '"'
|
||||||
. ( $is_const ? ' disabled aria-disabled="true"' : '' ) . '>';
|
. ( $is_const ? ' disabled aria-disabled="true"' : '' ) . '>';
|
||||||
|
|
||||||
if ( $is_const ) {
|
if ( $is_const ) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: PR Vision
|
* Plugin Name: PR Vision
|
||||||
* Plugin URI: https://peptiderepo.com
|
* Plugin URI: https://peptiderepo.com
|
||||||
* Description: Weekly server-side LLM probes for AI-visibility (GEO) tracking. Records whether peptiderepo.com is cited by LLMs across core peptides, stores time-series, and renders an admin dashboard + settings UI.
|
* Description: Weekly server-side LLM probes for AI-visibility (GEO) tracking. Records whether peptiderepo.com is cited by LLMs across core peptides, stores time-series, and renders an admin dashboard + settings UI.
|
||||||
* Version: 0.3.3
|
* Version: 0.3.2
|
||||||
* Author: peptiderepo
|
* Author: peptiderepo
|
||||||
* Author URI: https://peptiderepo.com
|
* Author URI: https://peptiderepo.com
|
||||||
* License: GPL-2.0-or-later
|
* License: GPL-2.0-or-later
|
||||||
@@ -24,7 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
|
|
||||||
/* ── Constants ────────────────────────────────────────────────────────── */
|
/* ── Constants ────────────────────────────────────────────────────────── */
|
||||||
|
|
||||||
define( 'PRV_VERSION', '0.3.3' );
|
define( 'PRV_VERSION', '0.3.2' );
|
||||||
define( 'PRV_PLUGIN_FILE', __FILE__ );
|
define( 'PRV_PLUGIN_FILE', __FILE__ );
|
||||||
define( 'PRV_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
define( 'PRV_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||||
define( 'PRV_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
define( 'PRV_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ if ( ! defined( 'ARRAY_N' ) ) {
|
|||||||
define( 'ARRAY_N', 'ARRAY_N' );
|
define( 'ARRAY_N', 'ARRAY_N' );
|
||||||
}
|
}
|
||||||
|
|
||||||
define( 'PRV_VERSION', '0.3.3' );
|
define( 'PRV_VERSION', '0.3.2' );
|
||||||
define( 'PRV_PLUGIN_FILE', __DIR__ . '/../pr-vision.php' );
|
define( 'PRV_PLUGIN_FILE', __DIR__ . '/../pr-vision.php' );
|
||||||
define( 'PRV_PLUGIN_DIR', realpath( __DIR__ . '/..' ) . '/' );
|
define( 'PRV_PLUGIN_DIR', realpath( __DIR__ . '/..' ) . '/' );
|
||||||
define( 'PRV_PLUGIN_URL', 'http://example.test/wp-content/plugins/pr-vision/' );
|
define( 'PRV_PLUGIN_URL', 'http://example.test/wp-content/plugins/pr-vision/' );
|
||||||
|
|||||||
Reference in New Issue
Block a user