Skip to content
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

Check for and update outdated integrations #4694

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
4ec98c6
check for outdated integrations
bengl May 10, 2024
030334d
pin everything
bengl May 10, 2024
f6d7609
switch to a big json list of package max versions
bengl May 11, 2024
69cbf21
run outdated checker a bunch of times per day
bengl May 11, 2024
b3b80d2
typo
bengl May 11, 2024
0e5cd60
fix: update latests.json
crysmags Sep 17, 2024
3b200e0
adding creating a pr from outdated integrations
crysmags Sep 17, 2024
673cdcf
removing work to update modules
crysmags Sep 17, 2024
9d60480
adding ability to modify plugin yaml
crysmags Sep 19, 2024
5a72dba
reworking ci
crysmags Sep 19, 2024
a292923
reworking ci
crysmags Sep 19, 2024
6f4b13b
reworking ci
crysmags Sep 19, 2024
559515b
reworking ci
crysmags Sep 19, 2024
d9e4580
reworking ci
crysmags Sep 19, 2024
aab81c8
reworking ci
crysmags Sep 19, 2024
8015542
reworking ci
crysmags Sep 19, 2024
d55b7ff
reworking ci
crysmags Sep 19, 2024
39363ce
reworking ci
crysmags Sep 19, 2024
cd6e9d5
reworking ci
crysmags Sep 19, 2024
5b9abbc
reworking ci
crysmags Sep 19, 2024
9c38a47
reworking ci
crysmags Sep 19, 2024
2a9e474
reworking ci
crysmags Sep 19, 2024
2d8b885
reworking ci
crysmags Sep 19, 2024
50237fa
reworking ci
crysmags Sep 19, 2024
5a354d2
reworking ci
crysmags Sep 19, 2024
61ffa44
reworking updating script to create matrices for plugins
crysmags Sep 23, 2024
d55455d
reworking ci
crysmags Sep 23, 2024
58218bd
reworking ci
crysmags Sep 23, 2024
9a1cf96
reworking ci
crysmags Sep 23, 2024
d2b9459
reworking ci
crysmags Sep 23, 2024
4b6740a
reworking ci
crysmags Sep 23, 2024
a937581
reworking ci
crysmags Sep 23, 2024
0f2bc40
reworking ci
crysmags Sep 23, 2024
ef00386
reworking ci
crysmags Sep 23, 2024
6aa6853
reworking ci
crysmags Sep 23, 2024
315238f
reworking ci
crysmags Sep 24, 2024
fce4e51
reworking ci
crysmags Sep 24, 2024
12c5198
reworking ci
crysmags Sep 24, 2024
a8b7234
reworking ci
crysmags Sep 24, 2024
f6039d8
adding script to create matrix
crysmags Sep 24, 2024
1af7503
adding script to create matrix
crysmags Sep 25, 2024
9a507cc
adding script to create matrix
crysmags Sep 25, 2024
5a33b02
adding script to create matrix
crysmags Sep 25, 2024
85a1477
adding script to create matrix
crysmags Sep 25, 2024
82fd66a
adding script to create matrix
crysmags Sep 25, 2024
2aa7fec
updating scripts
crysmags Sep 26, 2024
b3414a5
removing matrices.json
crysmags Sep 27, 2024
eb7e897
removing matrices.jn
crysmags Sep 27, 2024
eb02ccf
removing matrices.json
crysmags Oct 1, 2024
154efc2
removing matrices.json
crysmags Oct 1, 2024
46b4703
removing matrices.json
crysmags Oct 1, 2024
d4a4d3c
removing matrices.json
crysmags Oct 1, 2024
4e0906c
updating versions json
crysmags Oct 2, 2024
f9273e9
resolving outdated script
crysmags Oct 8, 2024
34b5c1b
changing plugin yml with matrices
crysmags Oct 22, 2024
4a71ecc
changing plugin yml with matrices
crysmags Oct 23, 2024
759edcb
changing plugin yml with matrices
crysmags Oct 24, 2024
4b6a133
changing plugin yml
crysmags Oct 24, 2024
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
15 changes: 15 additions & 0 deletions .github/workflows/outdated-integrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Outdated Integrations

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

No explicit permissions set for at the workflow level (...read more)

Check the permissions granted to jobs

Datadog’s GitHub organization defines default permissions for the GITHUB_TOKEN to be restricted (contents:read, metadata:read and packages:read).

Your repository may require different setup, but please consider defining permissions for each job following the least privilege principle to restrict the impact of a possible compromission.

You can find the list of all possible permissions in Workflow syntax for GitHub Actions - GitHub Docs. Please note they can be defined at the job or the workflow level.

View in Datadog  Leave us feedback  Documentation

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

No explicit permissions set for at the workflow level (...read more)

Check the permissions granted to jobs

Datadog’s GitHub organization defines default permissions for the GITHUB_TOKEN to be restricted (contents:read, metadata:read and packages:read).

Your repository may require different setup, but please consider defining permissions for each job following the least privilege principle to restrict the impact of a possible compromission.

You can find the list of all possible permissions in Workflow syntax for GitHub Actions - GitHub Docs. Please note they can be defined at the job or the workflow level.

View in Datadog  Leave us feedback  Documentation


on:
schedule:
# This, will run every weekday at 2pm UTC
- cron: '0 14 * * 1,2,3,4,5'

jobs:
outdated-integrations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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, or at least by tag for trusted sources

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 not immutable, using a full length hash is recommended to make sure the action content is actually frozen to some reviewed state.

Be careful however, as even pinning an action by hash can be circumvented by attackers still. For instance, if an action relies on a Docker image which is itself not pinned to a digest, it becomes possible to alter its behaviour through the Docker image without actually changing its hash. You can learn more about this kind of attacks in Unpinnable Actions: How Malicious Code Can Sneak into Your GitHub Actions Workflows. Pinning actions by hash is still a good first line of defense against supply chain attacks.

Additionally, pinning by hash or tag means the action won’t benefit from newer version updates if any, including eventual security patches. Make sure to regularly check if newer versions for an action you use are available. For actions coming from a very trustworthy source, it can make sense to use a laxer pinning policy to benefit from updates as soon as possible.

View in Datadog  Leave us feedback  Documentation

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, or at least by tag for trusted sources

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 not immutable, using a full length hash is recommended to make sure the action content is actually frozen to some reviewed state.

Be careful however, as even pinning an action by hash can be circumvented by attackers still. For instance, if an action relies on a Docker image which is itself not pinned to a digest, it becomes possible to alter its behaviour through the Docker image without actually changing its hash. You can learn more about this kind of attacks in Unpinnable Actions: How Malicious Code Can Sneak into Your GitHub Actions Workflows. Pinning actions by hash is still a good first line of defense against supply chain attacks.

Additionally, pinning by hash or tag means the action won’t benefit from newer version updates if any, including eventual security patches. Make sure to regularly check if newer versions for an action you use are available. For actions coming from a very trustworthy source, it can make sense to use a laxer pinning policy to benefit from updates as soon as possible.

View in Datadog  Leave us feedback  Documentation

- uses: ./.github/actions/node/setup
- run: yarn install
- run: yarn outdated-integrations
Loading
Loading