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 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f7615d2
check for outdated integrations
bengl May 10, 2024
089cd42
pin everything
bengl May 10, 2024
51dc82e
switch to a big json list of package max versions
bengl May 11, 2024
66ec02f
run outdated checker a bunch of times per day
bengl May 11, 2024
0959889
typo
bengl May 11, 2024
4b19dca
fix: update latests.json
crysmags Sep 17, 2024
f1324e2
adding creating a pr from outdated integrations
crysmags Sep 17, 2024
5c9750f
removing work to update modules
crysmags Sep 17, 2024
7908633
adding ability to modify plugin yaml
crysmags Sep 19, 2024
d236fbb
reworking ci
crysmags Sep 19, 2024
1a03d8f
reworking ci
crysmags Sep 19, 2024
2cfc700
reworking ci
crysmags Sep 19, 2024
5285e1d
reworking ci
crysmags Sep 19, 2024
32875e1
reworking ci
crysmags Sep 19, 2024
65982a8
reworking ci
crysmags Sep 19, 2024
7fb60ab
reworking ci
crysmags Sep 19, 2024
2f30dd4
reworking ci
crysmags Sep 19, 2024
68d8266
reworking ci
crysmags Sep 19, 2024
a656651
reworking ci
crysmags Sep 19, 2024
ab0b02f
reworking ci
crysmags Sep 19, 2024
8e87d98
reworking ci
crysmags Sep 19, 2024
3b8def3
reworking ci
crysmags Sep 19, 2024
ef24842
reworking ci
crysmags Sep 19, 2024
20ea671
reworking ci
crysmags Sep 19, 2024
a0cf258
reworking ci
crysmags Sep 19, 2024
b08b143
reworking updating script to create matrices for plugins
crysmags Sep 23, 2024
6adc860
reworking ci
crysmags Sep 23, 2024
4aaeb52
reworking ci
crysmags Sep 23, 2024
2c6c42a
reworking ci
crysmags Sep 23, 2024
19ee36e
reworking ci
crysmags Sep 23, 2024
062e8fe
reworking ci
crysmags Sep 23, 2024
ce6faa3
reworking ci
crysmags Sep 23, 2024
dae192b
reworking ci
crysmags Sep 23, 2024
d07fd87
reworking ci
crysmags Sep 23, 2024
6307f87
reworking ci
crysmags Sep 23, 2024
e54a2b6
reworking ci
crysmags Sep 24, 2024
3ed8261
reworking ci
crysmags Sep 24, 2024
738dd5c
reworking ci
crysmags Sep 24, 2024
7d6cca6
reworking ci
crysmags Sep 24, 2024
3ec75cd
adding script to create matrix
crysmags Sep 24, 2024
482e701
adding script to create matrix
crysmags Sep 25, 2024
3c65afb
adding script to create matrix
crysmags Sep 25, 2024
c1bd2eb
adding script to create matrix
crysmags Sep 25, 2024
f1565eb
adding script to create matrix
crysmags Sep 25, 2024
5da8933
adding script to create matrix
crysmags Sep 25, 2024
4860292
updating scripts
crysmags Sep 26, 2024
ebfb9b8
removing matrices.json
crysmags Sep 27, 2024
1b20c5f
removing matrices.jn
crysmags Sep 27, 2024
7f9decd
removing matrices.json
crysmags Oct 1, 2024
cd064f6
removing matrices.json
crysmags Oct 1, 2024
6ee768c
removing matrices.json
crysmags Oct 1, 2024
d336692
removing matrices.json
crysmags Oct 1, 2024
07b2634
updating versions json
crysmags Oct 2, 2024
fe05b28
resolving outdated script
crysmags Oct 8, 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:
# Yes, this runs a _lot_. We don't want to be out of date for very long.
- cron: '37 12,16,22 * * *'

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