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 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
04fa7b6
check for outdated integrations
bengl May 10, 2024
970a9ea
pin everything
bengl May 10, 2024
d992cb9
switch to a big json list of package max versions
bengl May 11, 2024
7d88d01
run outdated checker a bunch of times per day
bengl May 11, 2024
19889c0
typo
bengl May 11, 2024
c677714
fix: update latests.json
crysmags Sep 17, 2024
c7d01f7
adding creating a pr from outdated integrations
crysmags Sep 17, 2024
e9c93e0
removing work to update modules
crysmags Sep 17, 2024
8a450ad
adding ability to modify plugin yaml
crysmags Sep 19, 2024
36d0809
reworking ci
crysmags Sep 19, 2024
c21893d
reworking ci
crysmags Sep 19, 2024
8c52acc
reworking ci
crysmags Sep 19, 2024
3370f2f
reworking ci
crysmags Sep 19, 2024
4d5eaaf
reworking ci
crysmags Sep 19, 2024
b5514ce
reworking ci
crysmags Sep 19, 2024
766f2b0
reworking ci
crysmags Sep 19, 2024
4382510
reworking ci
crysmags Sep 19, 2024
2e44346
reworking ci
crysmags Sep 19, 2024
4c72c1f
reworking ci
crysmags Sep 19, 2024
0a22efa
reworking ci
crysmags Sep 19, 2024
8cfab9d
reworking ci
crysmags Sep 19, 2024
e939a4a
reworking ci
crysmags Sep 19, 2024
7c590b3
reworking ci
crysmags Sep 19, 2024
d672666
reworking ci
crysmags Sep 19, 2024
5752fdd
reworking ci
crysmags Sep 19, 2024
e56dec8
reworking updating script to create matrices for plugins
crysmags Sep 23, 2024
3439a42
reworking ci
crysmags Sep 23, 2024
7066114
reworking ci
crysmags Sep 23, 2024
5578926
reworking ci
crysmags Sep 23, 2024
db77deb
reworking ci
crysmags Sep 23, 2024
f1b01a2
reworking ci
crysmags Sep 23, 2024
e4b2f0c
reworking ci
crysmags Sep 23, 2024
14fc7af
reworking ci
crysmags Sep 23, 2024
5fffb81
reworking ci
crysmags Sep 23, 2024
f0488d8
reworking ci
crysmags Sep 23, 2024
469e34c
reworking ci
crysmags Sep 24, 2024
db14751
reworking ci
crysmags Sep 24, 2024
e65ec4a
reworking ci
crysmags Sep 24, 2024
6fd1576
reworking ci
crysmags Sep 24, 2024
01d2ced
adding script to create matrix
crysmags Sep 24, 2024
3f0f656
adding script to create matrix
crysmags Sep 25, 2024
4b9fddc
adding script to create matrix
crysmags Sep 25, 2024
15c55e5
adding script to create matrix
crysmags Sep 25, 2024
37a81a9
adding script to create matrix
crysmags Sep 25, 2024
4204d56
adding script to create matrix
crysmags Sep 25, 2024
e9cd982
updating scripts
crysmags Sep 26, 2024
6fdb48c
removing matrices.json
crysmags Sep 27, 2024
0aed2d7
removing matrices.jn
crysmags Sep 27, 2024
f14aa34
removing matrices.json
crysmags Oct 1, 2024
da9759b
removing matrices.json
crysmags Oct 1, 2024
15029f7
removing matrices.json
crysmags Oct 1, 2024
8f59e94
removing matrices.json
crysmags Oct 1, 2024
c515418
updating versions json
crysmags Oct 2, 2024
493ff18
resolving outdated script
crysmags Oct 8, 2024
e4fa8ab
changing plugin yml with matrices
crysmags Oct 22, 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