Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,27 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Log in to the Container registry
- name: Log in to GHCR
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.PACKAGE_SCOPE }}

- name: Log in to ACR
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.ACR_AZUREHOUND_REGISTRY_URL }}
username: ${{ secrets.ACR_CLIENT_ID }}
password: ${{ secrets.ACR_SECRET }}

Comment on lines +165 to +171
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Pin azure/docker-login and validate login-server format

  • Pin the action to a commit SHA to mitigate supply-chain risk.
  • Ensure ${{ secrets.ACR_AZUREHOUND_REGISTRY_URL }} is host-only without scheme (e.g., myregistry.azurecr.io), as required by the action.
-      - name: Log in to ACR
-        uses: azure/docker-login@v1
+      - name: Log in to ACR
+        uses: azure/docker-login@<commit-sha>
         with:
           login-server: ${{ secrets.ACR_AZUREHOUND_REGISTRY_URL }}
           username: ${{ secrets.ACR_CLIENT_ID }}
           password: ${{ secrets.ACR_SECRET }}

Optional: Consider migrating to federated credentials (OIDC) with azure/login@v2 + az acr login to drop the client secret entirely. Want a sample? I can provide one.


Pin azure/docker-login and validate ACR registry URL

  • In .github/workflows/publish.yml (lines 165–171):
    • Pin azure/docker-login to a specific commit SHA instead of a floating version.
    • Ensure ${{ secrets.ACR_AZUREHOUND_REGISTRY_URL }} contains only the hostname (e.g. myregistry.azurecr.io) with no URL scheme.

Suggested diff:

-      - name: Log in to ACR
-        uses: azure/docker-login@v1
+      - name: Log in to ACR
+        uses: azure/docker-login@<commit-sha>
         with:
           login-server: ${{ secrets.ACR_AZUREHOUND_REGISTRY_URL }}
           username: ${{ secrets.ACR_CLIENT_ID }}
           password: ${{ secrets.ACR_SECRET }}

Optional: To eliminate the client secret altogether, consider swapping to OIDC-based login using azure/login@v2 + az acr login. Let me know if you’d like a config example!

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Log in to ACR
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.ACR_AZUREHOUND_REGISTRY_URL }}
username: ${{ secrets.ACR_CLIENT_ID }}
password: ${{ secrets.ACR_SECRET }}
- name: Log in to ACR
uses: azure/docker-login@<commit-sha>
with:
login-server: ${{ secrets.ACR_AZUREHOUND_REGISTRY_URL }}
username: ${{ secrets.ACR_CLIENT_ID }}
password: ${{ secrets.ACR_SECRET }}
🤖 Prompt for AI Agents
In .github/workflows/publish.yml around lines 165 to 171, update the
azure/docker-login action to use a specific commit SHA instead of the floating
v1 version to ensure stability. Also, verify that the secret
ACR_AZUREHOUND_REGISTRY_URL contains only the registry hostname without any URL
scheme like https://. Optionally, consider replacing this login step with an
OIDC-based login using azure/login@v2 and az acr login to avoid using client
secrets.

- name: Extract metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ghcr.io/bloodhoundad/azurehound
images: |
ghcr.io/bloodhoundad/azurehound
${{ secrets.ACR_AZUREHOUND_REGISTRY_URL }}/azurehound
tags: |
type=semver,pattern={{version}},prefix=v
type=semver,pattern={{major}}.{{minor}},prefix=v
Expand Down
Loading