New: Added source of the request - #225
Merged
Merged
Conversation
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ PR Description
1. Problem & Context
Plugin now tracks the source channel (REST, CLI, XML-RPC, WP-Cron, WP Abilities) and app password names for each logged action. Replaces IP-only display with richer request source metadata, enabling better audit visibility without conditional logic in list table.
2. What Changed (Where)
request_sourceDB column with optionalmetaJSON fieldsourcecolumn; added source filter UI and search support3. How It Works
On log insertion,
AAL_API::resolve_request_source()detects active channel (ability stack → REST → XML-RPC → CLI → cron → empty), captures app password name viaapplication_password_did_authenticatehook or REST fallback, encodes as{channel}|app:{name}. List table parses and renders as clickable badges; filters apply prefix/literal matching on stored format. Upgrade runs auto onadmin_initfor small tables (<50k rows), prompts manual for large ones; schema check gated by version option with static cache.4. Risks
Large table upgrades: ALTER TABLE on production logs could lock reads. Mitigated by row-count threshold triggering manual pathway with unlimited execution time. Backward compat: Upgrade idempotent but skips if columns exist; old logs lack source (handled via null coalesce). Test coverage: Two new test suites validate parsing, channel resolution, upgrade lifecycle—pass locally before merge.
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how