Plugin testing - #152
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces an Antigravity plugin for Firebase, adding testing instructions, hooks, system instructions, and several skill definitions for project creation, Cloud Run deployment, security rules scoring, rules deployment, and rules generation. The review feedback points out several issues that need addressing: a typo in the firbease-score-rules folder name, an incorrect rubric file path in hooks.json, hardcoded values (such as operation IDs, project IDs, and personal emails) in the testing instructions and skill definitions, and escaped markdown headers in the rules generation skill.
| "command_pattern": ".*firebase deploy --only firestore(:rules)?.*", | ||
| "action": { | ||
| "type": "evaluate", | ||
| "rubric_file": "./skills/firebase-score-rules.md", |
There was a problem hiding this comment.
The path to the rubric file is incorrect. It points to ./skills/firebase-score-rules.md, but the actual file is located at ./skills/firebase-score-rules/SKILL.md (after correcting the folder name typo). Please update the path to ensure the pre-deployment hook can find and evaluate the rubric correctly.
| "rubric_file": "./skills/firebase-score-rules.md", | |
| "rubric_file": "./skills/firebase-score-rules/SKILL.md", |
|
|
||
| Listen on the operations endpoint for the result: | ||
| ``` | ||
| curl -X GET "https://firebase.googleapis.com/v1beta1/operations/workflows/ZDBiYzVmMGEtNjdiNS00ODA5LTk5MDktMDhmYWZjZDY1Zjcx" \ |
There was a problem hiding this comment.
The operation ID in the polling command is hardcoded. Since this is a skill definition used by an AI agent, the agent will attempt to poll this static ID instead of the actual operation ID returned by the previous project creation step. Use a placeholder so the agent knows to replace it dynamically.
| curl -X GET "https://firebase.googleapis.com/v1beta1/operations/workflows/ZDBiYzVmMGEtNjdiNS00ODA5LTk5MDktMDhmYWZjZDY1Zjcx" \ | |
| curl -X GET "https://firebase.googleapis.com/v1beta1/operations/workflows/<OPERATION_ID>" \ |
| @@ -0,0 +1,70 @@ | |||
| --- | |||
| name: firebase-score-rules | |||
| ``` | ||
| curl -X POST https://firebase.googleapis.com/v1alpha/firebase:provisionFirebaseApp \ | ||
| -H "Authorization: Bearer $(gcloud auth print-access-token)" \ | ||
| -H "X-Goog-User-Project: ctfdc1" \ |
|
|
||
| Pre-flight checks: | ||
| - ensure you're not using corp - this prevents new project creation (you'll get a 401) | ||
| - `gcloud config set account christhompsonfirebase@gmail.com` |
| Since the creation of Firebase resources happens asynchronously, you can poll and monitor the creation progress by querying the returned operation name | ||
|
|
||
| ``` | ||
| curl -X GET "https://firebase.googleapis.com/v1beta1/operations/workflows/ZDBiYzVmMGEtNjdiNS00ODA5LTk5MDktMDhmYWZjZDY1Zjcx" \ |
There was a problem hiding this comment.
The operation ID in the polling command is hardcoded. Use a placeholder like <OPERATION_ID> to indicate that the user should replace it with the actual operation ID returned from the previous step.
| curl -X GET "https://firebase.googleapis.com/v1beta1/operations/workflows/ZDBiYzVmMGEtNjdiNS00ODA5LTk5MDktMDhmYWZjZDY1Zjcx" \ | |
| curl -X GET "https://firebase.googleapis.com/v1beta1/operations/workflows/<OPERATION_ID>" \ |
| validating field values against a list of allowed options and controlling how | ||
| and when fields can change. | ||
|
|
||
| \#### 1. Enforce Enum Values |
| allow create: if isValidStatus() && ... | ||
| ``` | ||
|
|
||
| \#### 2. Validate State Transitions |
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
No description provided.