{"data":{"skill":{"slug":"firebase-firebase-ai-logic-basics","name":"firebase-ai-logic-basics","icon":"📦","repo":"https://github.com/firebase/agent-skills/tree/main/skills/firebase-ai-logic-basics/","status":"approved","author":"firebase","authorVersion":null,"skillstoreRevision":null},"audit":{"id":"7297a0a7-9a18-4f53-a23c-50c79010e4d2","skill_id":"7d860da7-9dbb-4e78-865f-6ab6ba6c77ad","version":4,"content_hash":"d3778c69ecc943c946885f1a2e639394","risk_level":"safe","is_blocked":false,"safe_to_publish":true,"analysis_status":"ok","agent_auto_install_policy":"allowed","manual_install_policy":"allowed","summary":"Most static alerts are false positives caused by Markdown backticks, official Firebase documentation links, and language examples. The actionable risks are npm and npx Firebase CLI commands that install tooling, enumerate Firebase metadata, or provision AI Logic. I found no prompt injection or malicious exfiltration intent in the reviewed files.","remediation":[{"issue":"Unpinned Firebase CLI installation and execution","severity":"medium","suggestion":"Pin firebase and firebase-tools to reviewed versions, and ask for user approval before running npm or npx commands."},{"issue":"Firebase project enumeration and provisioning commands","severity":"medium","suggestion":"Confirm the active Firebase project and app before projects:list, apps:list, or init ailogic. Explain expected cloud changes first."}],"risk_factor_evidence":[{"factor":"network","evidence":[{"file":"references/usage_patterns_android.md","line_end":22,"line_start":22},{"file":"SKILL.md","line_end":25,"line_start":25},{"file":"SKILL.md","line_end":47,"line_start":47},{"file":"SKILL.md","line_end":84,"line_start":84},{"file":"SKILL.md","line_end":93,"line_start":93},{"file":"SKILL.md","line_end":97,"line_start":97}]},{"factor":"external_commands","evidence":[{"file":"references/usage_patterns_web.md","line_end":34,"line_start":32},{"file":"references/usage_patterns_web.md","line_end":132,"line_start":120},{"file":"references/usage_patterns_web.md","line_end":145,"line_start":132},{"file":"SKILL.md","line_end":31,"line_start":31},{"file":"SKILL.md","line_end":35,"line_start":35},{"file":"SKILL.md","line_end":39,"line_start":39},{"file":"SKILL.md","line_end":43,"line_start":43},{"file":"SKILL.md","line_end":59,"line_start":59},{"file":"SKILL.md","line_end":63,"line_start":63},{"file":"SKILL.md","line_end":97,"line_start":97},{"file":"SKILL.md","line_end":102,"line_start":102}]}],"critical_findings":[],"high_findings":[],"medium_findings":[{"title":"Ruby/shell backtick execution","locations":[{"file":"SKILL.md","line_end":31,"line_start":31}],"confidence":0.84,"description":"`npm install -g firebase@latest`","review_kind":"capability","source_category":"external_commands","source_severity":"medium","confidence_reasoning":"The skill instructs installing the latest Firebase package globally with npm. This performs network package installation and changes the user environment."},{"title":"Ruby/shell backtick execution","locations":[{"file":"SKILL.md","line_end":35,"line_start":35}],"confidence":0.82,"description":"`npx -y firebase-tools@latest projects:list`","review_kind":"capability","source_category":"external_commands","source_severity":"medium","confidence_reasoning":"The npx command executes latest Firebase tooling and lists Firebase projects for the authenticated account. That can expose project metadata and should require consent."},{"title":"Ruby/shell backtick execution","locations":[{"file":"SKILL.md","line_end":39,"line_start":39}],"confidence":0.82,"description":"`npx -y firebase-tools@latest apps:list`","review_kind":"capability","source_category":"external_commands","source_severity":"medium","confidence_reasoning":"The npx command runs Firebase tooling and enumerates apps in the selected project. It is legitimate setup work but still has account metadata exposure risk."},{"title":"Ruby/shell backtick execution","locations":[{"file":"SKILL.md","line_end":43,"line_start":43}],"confidence":0.86,"description":"`npx -y firebase-tools@latest init ailogic`","review_kind":"capability","source_category":"external_commands","source_severity":"medium","confidence_reasoning":"The command initializes AI Logic through Firebase tooling and can modify cloud project configuration. It should never run without explicit user approval."},{"title":"Ruby/shell backtick execution","locations":[{"file":"SKILL.md","line_end":102,"line_start":102}],"confidence":0.86,"description":"> For all platforms (Flutter, Android, iOS, Web), you MUST run `npx firebase-tools init ailogic` to ","review_kind":"capability","source_category":"external_commands","source_severity":"medium","confidence_reasoning":"The skill mandates running Firebase CLI initialization for all platforms. This can provision services in a Firebase project and needs explicit user confirmation."}],"low_findings":[],"dangerous_patterns":[],"files_scanned":5,"total_lines":679,"audit_model":"codex","audited_at":"2026-07-06T14:33:51.723+00:00","created_at":"2026-07-07T02:36:38.555009+00:00","static_findings":[{"id":"blocker:references/flutter_setup.md:9:system-reconnaissance","file":"references/flutter_setup.md","pattern":"System reconnaissance","snippet":"> 3. **Client Configuration:** Use `flutterfire configure` strictly for generating `firebase_options","category":"blocker","line_end":9,"severity":"low","line_start":9},{"id":"blocker:references/flutter_setup.md:38:system-reconnaissance","file":"references/flutter_setup.md","pattern":"System reconnaissance","snippet":"void main() async {","category":"blocker","line_end":38,"severity":"low","line_start":38},{"id":"blocker:references/flutter_setup.md:54:system-reconnaissance","file":"references/flutter_setup.md","pattern":"System reconnaissance","snippet":"> **Choose the Right API Provider:** Always use `FirebaseAI.googleAI` (Gemini Developer API) as the ","category":"blocker","line_end":54,"severity":"low","line_start":54},{"id":"network:references/usage_patterns_android.md:22:hardcoded-url","file":"references/usage_patterns_android.md","pattern":"Hardcoded URL","snippet":"// [AGENT] Fetch the latest available BoM version from https://firebase.google.com/support/release-n","category":"network","line_end":22,"severity":"low","line_start":22},{"id":"blocker:references/usage_patterns_android.md:1:system-reconnaissance","file":"references/usage_patterns_android.md","pattern":"System reconnaissance","snippet":"# Firebase AI Logic on Android (Kotlin)","category":"blocker","line_end":1,"severity":"low","line_start":1},{"id":"blocker:references/usage_patterns_android.md:22:system-reconnaissance","file":"references/usage_patterns_android.md","pattern":"System reconnaissance","snippet":"// [AGENT] Fetch the latest available BoM version from https://firebase.google.com/support/release-n","category":"blocker","line_end":22,"severity":"low","line_start":22},{"id":"external_commands:references/usage_patterns_web.md:32:ruby-shell-backtick-execution","file":"references/usage_patterns_web.md","pattern":"Ruby/shell backtick execution","snippet":"// Specify the config as part of creating the `GenerativeModel` instance","category":"external_commands","line_end":34,"severity":"medium","line_start":32},{"id":"external_commands:references/usage_patterns_web.md:120:ruby-shell-backtick-execution","file":"references/usage_patterns_web.md","pattern":"Ruby/shell backtick execution","snippet":"// Create a `GenerativeModel` instance with a model that supports your use case","category":"external_commands","line_end":132,"severity":"medium","line_start":120},{"id":"external_commands:references/usage_patterns_web.md:132:ruby-shell-backtick-execution","file":"references/usage_patterns_web.md","pattern":"Ruby/shell backtick execution","snippet":"// To generate an image, call `generateContent` with the text input","category":"external_commands","line_end":145,"severity":"medium","line_start":132},{"id":"external_commands:SKILL.md:31:ruby-shell-backtick-execution","file":"SKILL.md","pattern":"Ruby/shell backtick execution","snippet":"`npm install -g firebase@latest`","category":"external_commands","line_end":31,"severity":"medium","line_start":31},{"id":"external_commands:SKILL.md:35:ruby-shell-backtick-execution","file":"SKILL.md","pattern":"Ruby/shell backtick execution","snippet":"`npx -y firebase-tools@latest projects:list`","category":"external_commands","line_end":35,"severity":"medium","line_start":35},{"id":"external_commands:SKILL.md:39:ruby-shell-backtick-execution","file":"SKILL.md","pattern":"Ruby/shell backtick execution","snippet":"`npx -y firebase-tools@latest apps:list`","category":"external_commands","line_end":39,"severity":"medium","line_start":39},{"id":"external_commands:SKILL.md:43:ruby-shell-backtick-execution","file":"SKILL.md","pattern":"Ruby/shell backtick execution","snippet":"`npx -y firebase-tools@latest init ailogic`","category":"external_commands","line_end":43,"severity":"medium","line_start":43},{"id":"external_commands:SKILL.md:59:ruby-shell-backtick-execution","file":"SKILL.md","pattern":"Ruby/shell backtick execution","snippet":"Maintain history automatically using `startChat`.","category":"external_commands","line_end":59,"severity":"medium","line_start":59},{"id":"external_commands:SKILL.md:63:ruby-shell-backtick-execution","file":"SKILL.md","pattern":"Ruby/shell backtick execution","snippet":"To improve the user experience by showing partial results as they arrive (like a typing effect), use","category":"external_commands","line_end":63,"severity":"medium","line_start":63},{"id":"external_commands:SKILL.md:97:ruby-shell-backtick-execution","file":"SKILL.md","pattern":"Ruby/shell backtick execution","snippet":"Consider that you do not need to hardcode model names (e.g., `gemini-flash-lite-latest`). Use Fireba","category":"external_commands","line_end":97,"severity":"medium","line_start":97},{"id":"external_commands:SKILL.md:102:ruby-shell-backtick-execution","file":"SKILL.md","pattern":"Ruby/shell backtick execution","snippet":"> For all platforms (Flutter, Android, iOS, Web), you MUST run `npx firebase-tools init ailogic` to ","category":"external_commands","line_end":102,"severity":"medium","line_start":102},{"id":"network:SKILL.md:25:hardcoded-url","file":"SKILL.md","pattern":"Hardcoded URL","snippet":"- If their platform is unsupported, Direct the user to Firebase Docs to learn how to set up AI Logic","category":"network","line_end":25,"severity":"low","line_start":25},{"id":"network:SKILL.md:47:hardcoded-url","file":"SKILL.md","pattern":"Hardcoded URL","snippet":"More info in [Firebase AI Logic Getting Started](https://firebase.google.com/docs/ai-logic/get-start","category":"network","line_end":47,"severity":"low","line_start":47},{"id":"network:SKILL.md:84:hardcoded-url","file":"SKILL.md","pattern":"Hardcoded URL","snippet":"Hybrid on-device inference for web apps, where the Firebase Javascript SDK automatically checks for ","category":"network","line_end":84,"severity":"low","line_start":84},{"id":"network:SKILL.md:93:hardcoded-url","file":"SKILL.md","pattern":"Hardcoded URL","snippet":"See [App Check with reCAPTCHA Enterprise](https://firebase.google.com/docs/app-check/web/recaptcha-e","category":"network","line_end":93,"severity":"low","line_start":93},{"id":"network:SKILL.md:97:hardcoded-url","file":"SKILL.md","pattern":"Hardcoded URL","snippet":"Consider that you do not need to hardcode model names (e.g., `gemini-flash-lite-latest`). Use Fireba","category":"network","line_end":97,"severity":"low","line_start":97},{"id":"blocker:SKILL.md:84:system-reconnaissance","file":"SKILL.md","pattern":"System reconnaissance","snippet":"Hybrid on-device inference for web apps, where the Firebase Javascript SDK automatically checks for ","category":"blocker","line_end":84,"severity":"low","line_start":84},{"id":"blocker:SKILL.md:120:system-reconnaissance","file":"SKILL.md","pattern":"System reconnaissance","snippet":"[Android (Kotlin) SDK usage patterns](references/usage_patterns_android.md)","category":"blocker","line_end":120,"severity":"low","line_start":120}],"finding_verdicts":[{"id":"blocker:references/flutter_setup.md:9:system-reconnaissance","reason":"The line explains that flutterfire configure generates client options. It does not gather host or user system data.","verdict":"false_positive","confidence":0.92},{"id":"blocker:references/flutter_setup.md:38:system-reconnaissance","reason":"This is a Dart main function declaration in a Firebase initialization example. No reconnaissance or inspection behavior is present.","verdict":"false_positive","confidence":0.98},{"id":"blocker:references/flutter_setup.md:54:system-reconnaissance","reason":"The line recommends the Gemini Developer API provider for Firebase AI Logic. It is configuration guidance, not reconnaissance.","verdict":"false_positive","confidence":0.95},{"id":"network:references/usage_patterns_android.md:22:hardcoded-url","reason":"The URL points to official Firebase Android release notes so an agent can choose a current BoM version. It is not an exfiltration endpoint.","verdict":"false_positive","confidence":0.87},{"id":"blocker:references/usage_patterns_android.md:1:system-reconnaissance","reason":"This line is only the Markdown title for an Android Firebase AI Logic guide. It contains no operational instruction.","verdict":"false_positive","confidence":0.99},{"id":"blocker:references/usage_patterns_android.md:22:system-reconnaissance","reason":"The instruction fetches an official Firebase release note page to select a dependency version. It does not inspect the local system or user environment.","verdict":"false_positive","confidence":0.88},{"id":"external_commands:references/usage_patterns_web.md:32:ruby-shell-backtick-execution","reason":"The backticks are Markdown formatting around a JavaScript API name. No Ruby or shell command execution is present.","verdict":"false_positive","confidence":0.96},{"id":"external_commands:references/usage_patterns_web.md:120:ruby-shell-backtick-execution","reason":"The line is a JavaScript comment in a code example and uses Markdown backticks for an API name. It does not execute shell commands.","verdict":"false_positive","confidence":0.96},{"id":"external_commands:references/usage_patterns_web.md:132:ruby-shell-backtick-execution","reason":"This is explanatory text for a Firebase SDK method call. The backticks do not indicate executable shell or Ruby code.","verdict":"false_positive","confidence":0.96},{"id":"external_commands:SKILL.md:31:ruby-shell-backtick-execution","reason":"The skill instructs installing the latest Firebase package globally with npm. This performs network package installation and changes the user environment.","verdict":"confirmed","severity":"medium","confidence":0.84},{"id":"external_commands:SKILL.md:35:ruby-shell-backtick-execution","reason":"The npx command executes latest Firebase tooling and lists Firebase projects for the authenticated account. That can expose project metadata and should require consent.","verdict":"confirmed","severity":"medium","confidence":0.82},{"id":"external_commands:SKILL.md:39:ruby-shell-backtick-execution","reason":"The npx command runs Firebase tooling and enumerates apps in the selected project. It is legitimate setup work but still has account metadata exposure risk.","verdict":"confirmed","severity":"medium","confidence":0.82},{"id":"external_commands:SKILL.md:43:ruby-shell-backtick-execution","reason":"The command initializes AI Logic through Firebase tooling and can modify cloud project configuration. It should never run without explicit user approval.","verdict":"confirmed","severity":"medium","confidence":0.86},{"id":"external_commands:SKILL.md:59:ruby-shell-backtick-execution","reason":"The line names the Firebase SDK startChat API inside Markdown backticks. It is not a shell execution primitive.","verdict":"false_positive","confidence":0.97},{"id":"external_commands:SKILL.md:63:ruby-shell-backtick-execution","reason":"The line names generateContentStream as an SDK method. The backticks are Markdown formatting and no command execution occurs.","verdict":"false_positive","confidence":0.97},{"id":"external_commands:SKILL.md:97:ruby-shell-backtick-execution","reason":"This line discusses model names and Remote Config. The backticks format an example model string, not executable code.","verdict":"false_positive","confidence":0.95},{"id":"external_commands:SKILL.md:102:ruby-shell-backtick-execution","reason":"The skill mandates running Firebase CLI initialization for all platforms. This can provision services in a Firebase project and needs explicit user confirmation.","verdict":"confirmed","severity":"medium","confidence":0.86},{"id":"network:SKILL.md:25:hardcoded-url","reason":"The URL directs users to official Firebase AI Logic setup documentation for unsupported platforms. It is a benign documentation link.","verdict":"false_positive","confidence":0.91},{"id":"network:SKILL.md:47:hardcoded-url","reason":"The URL links to official Firebase getting-started documentation. It does not receive user data or credentials.","verdict":"false_positive","confidence":0.92},{"id":"network:SKILL.md:84:hardcoded-url","reason":"The URL links to official Firebase hybrid on-device inference documentation. The surrounding text describes SDK behavior, not malicious network activity.","verdict":"false_positive","confidence":0.9},{"id":"network:SKILL.md:93:hardcoded-url","reason":"The URL points to official Firebase App Check documentation. It supports a security control rather than unsafe network behavior.","verdict":"false_positive","confidence":0.92},{"id":"network:SKILL.md:97:hardcoded-url","reason":"The URL points to official Firebase Remote Config guidance for model names. It is documentation access, not data exfiltration.","verdict":"false_positive","confidence":0.9},{"id":"blocker:SKILL.md:84:system-reconnaissance","reason":"The text describes Firebase SDK selection between on-device and cloud inference. It does not instruct broad host reconnaissance or data collection.","verdict":"false_positive","confidence":0.89},{"id":"blocker:SKILL.md:120:system-reconnaissance","reason":"The line is a Markdown reference link to the Android usage pattern file. It contains no reconnaissance behavior.","verdict":"false_positive","confidence":0.98}],"semantic_findings":[],"subject_marketplace_commit_sha":null,"subject_content_hash":null,"subject_tree_hash":null,"subject_plugin_path":null,"audit_payload_hash":null,"confirmed_risk_level":null,"scanner_version":null,"policy_version":null,"subject":{"marketplaceCommitSha":null,"contentHash":null,"treeHash":null,"pluginPath":null,"auditPayloadHash":null},"scannerVersion":null,"policyVersion":null},"auditTranslation":null,"localization":{"requestedLocale":"en","contentLocale":"en","availableLocales":["en"],"fallbackToEnglish":false},"attestation":{"availability":"not_attestable","url":null,"status":null,"reason":"confirmed_risk_level does not match the canonical trust resolver"},"trust":{"publicState":"public","auditState":"complete","auditCurrentness":null,"confirmedRiskLevel":"safe","confirmedFindingCount":0,"capabilityReviewCount":5,"needsReviewCount":0,"falsePositiveCount":0,"agentAutoInstallPolicy":"allowed","manualInstallPolicy":"allowed","artifactSignatureState":"available","attestationState":"not_attestable","verificationState":"not_verified"},"isLatest":false}}