Skip to content

Devin.ford/workflow updates #30172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions .github/workflows/codeowner_review_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,27 @@ jobs:
permissions:
pull-requests: write
contents: read
id-token: write # Needed to federate tokens.
outputs:
approval_status: ${{ steps.check_approvals.outputs.approval_status }}
team_requested: ${{ steps.check_approvals.outputs.team_requested }}
steps:
- name: Debug OIDC Claims
uses: github/actions-oidc-debugger@main

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

Pin third party actions by hash

When using a third party action, one needs to provide its GitHub path (owner/project) and can eventually pin it to a git ref (a branch name, a git tag, or a commit hash).

No pinned git ref means the action will use the latest commit of the default branch each time it runs, eventually running newer versions of the code that were not audited by Datadog. Specifying a git tag is better, but since they are mutable, using a full length hash is recommended to make sure the action's content is actually frozen to some reviewed state.

If you wanna benefit from auto-updates, you can enable Dependabot on your repository. It is able to update actions pinned by hash and comment version numbers after them for better readability (see for instance this example PR).

View in Datadog  Leave us feedback  Documentation

with:
audience: "octo-debugger"
- uses: DataDog/dd-octo-sts-action@08f2144903ced3254a3dafec2592563409ba2aa0 # v1.0.1
id: octo-sts
with:
scope: DataDog
policy: documentation.read-org-members

- name: Validate STS Token
env:
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.sts_token }}
run: |
gh api -H "Authorization: Bearer ${{ env.GITHUB_TOKEN }}" /orgs/DataDog/teams/documentation/members

- name: Check Documentation Team Approval
id: check_approvals
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7
Expand Down
Loading