·
Last changedVersion:
No hardening report available.
This skill enables the agent to deploy and manage modern, full-stack web applications (Next.js, Angular, etc.) using Firebase App Hosting.
Important: In order to use App Hosting, your Firebase project must be on the Blaze pricing plan. Direct the user to https://console.firebase.google.com/project/_/overview?purchaseBillingPlan=metered to upgrade their plan. The Blaze plan charges pay as you go for usage. Inform the user of this and let the user make any billing change themselves.
Choose Firebase Hosting if:
Choose Firebase App Hosting if:
The commands below run the Firebase CLI through npx, which downloads
firebase-tools@latest from npm. Prefer a reviewed, locally installed Firebase
CLI when the project has one, and ask the user before letting npx download the
package.
This is the recommended flow for most users.
Configure firebase.json with an apphosting block.
Keep local .env* files, private keys, and service account credential
files out of the uploaded source by listing them in the ignore list. Before
deploying, check that no such credential files remain in the root directory.
Create or edit apphosting.yaml- see
Configuration for more information on how to
do so.
Create the backend if it does not exist (apphosting:backends:list). Before
creating it, confirm the project, backend ID, and region with the user. If a
region hits its 10-backend quota, report the error to the user and ask which
region to use instead, such as us-east4, then pass it with
--primary-region:
For sensitive keys/secrets (e.g., from .env*), identify only which variable
names need secrets; the user enters the values. Keep secret values out of
commands, output, and your own context. After creating the backend, have the
user run the first command below and type the value at the CLI prompt, then
grant access, and reference the secret via secret: (never value:):
Before setting a secret, ask the user whether a secret with that name
already exists, and replace an existing value only after the user confirms
the exact secret name and project. Before granting access, confirm the
secret name, backend ID, and project with the user, and grant access only to
secrets that apphosting.yaml references.
Run npx firebase-tools@latest deploy only after the user explicitly
approves this deploy.
Alternatively, set up a backend connected to a GitHub repository for automated
"git push" deployments. Connect only a protected live branch that requires pull
request review and passing checks, and confirm the repository and branch with
the user before connecting. For GitHub-connected backends, trigger rollouts with
npx firebase-tools@latest apphosting:rollouts:create <backend-id> --git-branch <branch>
only after the user approves the rollout for the named backend and branch
(do not use rollouts:create when deploying from local source with deploy).
For other backend or secret flags (backends:get, backends:delete, etc.), run
npx firebase-tools@latest <command> --help. Run backends:delete or any other
command that deletes or replaces backends or secrets only after the user
confirms the exact resource name and project.
See Emulation for more information on how to test your app locally using the Firebase Local Emulator Suite.
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.cgr.dev/public/github.com/firebase/skills/firebase-app-hosting-basics:latest
Apache-2.0
HARDENING.md
LICENSE
SKILL.md
references/configuration.md
references/emulation.md