fai-azure-static-web-apps-setup — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited fai-azure-static-web-apps-setup (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Deploy frontend apps with serverless APIs, preview environments, and role-based routing.
resource swa 'Microsoft.Web/staticSites@2023-12-01' = {
name: swaName
location: location
sku: { name: 'Standard', tier: 'Standard' }
properties: {
repositoryUrl: repoUrl
branch: 'main'
buildProperties: {
appLocation: '/'
apiLocation: 'api'
outputLocation: 'out'
}
}
}{
"routes": [
{ "route": "/admin/*", "allowedRoles": ["admin"] },
{ "route": "/api/*", "allowedRoles": ["authenticated"] },
{ "route": "/*", "allowedRoles": ["anonymous"] }
],
"auth": {
"identityProviders": {
"azureActiveDirectory": {
"registration": { "openIdIssuer": "https://login.microsoftonline.com/{tenant}/v2.0",
"clientIdSettingName": "AAD_CLIENT_ID" }
}
}
},
"responseOverrides": {
"401": { "redirect": "/.auth/login/aad", "statusCode": 302 },
"403": { "rewrite": "/unauthorized.html" }
},
"navigationFallback": { "rewrite": "/index.html",
"exclude": ["/api/*", "/images/*", "/*.{css,js,png,svg}"] }
}name: Deploy SWA
on:
push: { branches: [main] }
pull_request: { types: [opened, synchronize, closed], branches: [main] }
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.SWA_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: upload
app_location: /
api_location: api
output_location: out# Add custom domain
az staticwebapp hostname set --name $SWA --hostname app.example.com
# Configure cache headers in staticwebapp.config.json
# Already handled via globalHeaders{
"globalHeaders": {
"Cache-Control": "public, max-age=300",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY"
}
}| Issue | Cause | Fix |
|---|---|---|
| Auth bypass on preview envs | Role rules not applied per route | Define routes in staticwebapp.config.json |
| API returns 404 | api_location mismatch in build config | Verify apiLocation matches Functions folder |
| Deploy fails on PR | Token not set for fork PRs | Use repository_dispatch or restrict to same-repo PRs |
| Stale cache after deploy | Aggressive cache-control | Use versioned asset filenames, set short max-age for HTML |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.