Skip to content

Commit 1bae0f1

Browse files
committed
Merge branch 'master' of github.com:HackTricks-wiki/hacktricks-cloud
2 parents a65ebe2 + e8e5deb commit 1bae0f1

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/pentesting-cloud/azure-security/az-privilege-escalation/az-static-web-apps-privesc.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,19 @@ az rest --method put \
144144

145145
### Microsoft.Web/staticSites/listSecrets/action
146146

147-
This permission allows to get the **API key deployment token** for the static app:
147+
This permission allows to get the **API key deployment token** for the static app.
148+
149+
Using az rest:
148150

149151
```bash
150152
az rest --method POST \
151153
--url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<res-group>/providers/Microsoft.Web/staticSites/<app-name>/listSecrets?api-version=2023-01-01"
152154
```
155+
Using AzCLI:
156+
157+
```bash
158+
az staticwebapp secrets list --name <appname> --resource-group <RG>
159+
```
153160

154161
Then, in order to **update an app using the token** you could run the following command. Note that this command was extracted checking **how to Github Action [https://github.com/Azure/static-web-apps-deploy](https://github.com/Azure/static-web-apps-deploy) works**, as it's the one Azure set by default ot use. So the image and paarements could change in the future.
155162

0 commit comments

Comments
 (0)