Skip to content

Plugin testing - #152

Draft
christhompsongoogle wants to merge 4 commits into
mainfrom
agplugin
Draft

Plugin testing#152
christhompsongoogle wants to merge 4 commits into
mainfrom
agplugin

Conversation

@christhompsongoogle

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .antigravity-plugin/hooks.json Outdated
"command_pattern": ".*firebase deploy --only firestore(:rules)?.*",
"action": {
"type": "evaluate",
"rubric_file": "./skills/firebase-score-rules.md",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
"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" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The folder containing this skill is named firbease-score-rules, which contains a typo (firbease instead of firebase). Please rename the folder to firebase-score-rules to match the skill name and maintain consistency with references in other files.

```
curl -X POST https://firebase.googleapis.com/v1alpha/firebase:provisionFirebaseApp \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "X-Goog-User-Project: ctfdc1" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The project ID ctfdc1 is hardcoded. It is better to use a placeholder like <YOUR_PROJECT_ID> to make the skill reusable across different projects.

Suggested change
-H "X-Goog-User-Project: ctfdc1" \
-H "X-Goog-User-Project: <YOUR_PROJECT_ID>" \


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`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Avoid hardcoding personal email addresses in the testing instructions. Use a generic placeholder instead.

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" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The backslash before the header hash symbols (\####) prevents the markdown from rendering correctly as a header. Remove the backslash.

Suggested change
\#### 1. Enforce Enum Values
#### 1. Enforce Enum Values

allow create: if isValidStatus() && ...
```

\#### 2. Validate State Transitions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The backslash before the header hash symbols (\####) prevents the markdown from rendering correctly as a header. Remove the backslash.

Suggested change
\#### 2. Validate State Transitions
#### 2. Validate State Transitions

@wiz-9635d3485b

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 1 High 2 Low
SAST Finding SAST Findings 1 Medium 2 Low
Software Management Finding Software Management Findings -
Total 1 High 1 Medium 4 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant