Skip to content

Commit 82e6c8f

Browse files
authored
Merge branch 'main' into main
2 parents 8178f30 + 3b39491 commit 82e6c8f

20 files changed

+2111
-1018
lines changed

.cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
"encryptable",
114114
"esktop",
115115
"esult",
116+
"exploitability",
116117
"finlaymacklon",
117118
"forcelist",
118119
"fseventsd",
@@ -217,6 +218,7 @@
217218
"stefanzweifel",
218219
"svclog",
219220
"tada",
221+
"timedelay",
220222
"timemachine",
221223
"tqdm",
222224
"traceback",

.github/workflows/build.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,51 @@
11
name: build
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
410

511
jobs:
612
build:
713
runs-on: ubuntu-latest
814
strategy:
915
matrix:
10-
python-version: ["3.9"]
16+
python-version: ["3.12"]
1117

1218
steps:
13-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
1420
- name: Set up Python ${{ matrix.python-version }}
15-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
21+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
1622
with:
1723
python-version: ${{ matrix.python-version }}
1824

1925
- name: Install poetry
2026
run: make poetry-download
2127

2228
- name: Set up cache
23-
uses: actions/cache@v4.0.1
29+
uses: actions/cache@v5
2430
with:
2531
path: .venv
2632
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
2733
- name: Install dependencies
2834
run: |
2935
poetry config virtualenvs.in-project true
30-
poetry install
36+
poetry install --with dev
3137
3238
- name: Run style checks
3339
run: |
3440
make check-codestyle
3541
36-
- name: Run tests
37-
run: |
38-
make test
39-
4042
- name: Run safety checks
43+
if: github.repository == 'nvuillam/github-dependents-info' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
44+
env:
45+
SAFETY_API_KEY: ${{ secrets.SAFETY_API_KEY }}
4146
run: |
4247
make check-safety
48+
49+
- name: Run tests
50+
run: |
51+
make test

.github/workflows/github-dependents-info.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
steps:
3030
# Git Checkout
3131
- name: Checkout Code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v6
3333
with:
3434
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
3535
fetch-depth: 0
@@ -54,7 +54,7 @@ jobs:
5454
# Create pull request
5555
- name: Create Pull Request
5656
id: cpr
57-
uses: peter-evans/create-pull-request@v6
57+
uses: peter-evans/create-pull-request@v8
5858
with:
5959
token: ${{ secrets.GITHUB_TOKEN }}
6060
branch: github-dependents-info-auto-update

.github/workflows/mega-linter.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
name: MegaLinter
55

66
on:
7-
# Trigger mega-linter at every push. Action will also be visible from Pull Requests to master
8-
push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions)
7+
push:
8+
branches:
9+
- main
910
pull_request:
10-
branches: [master, main]
11+
branches:
12+
- main
1113

1214
env: # Comment env block if you do not want to apply fixes
1315
# Apply linter fixes configuration
@@ -26,7 +28,7 @@ jobs:
2628
steps:
2729
# Git Checkout
2830
- name: Checkout Code
29-
uses: actions/checkout@v4
31+
uses: actions/checkout@v6
3032
with:
3133
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
3234
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
@@ -35,19 +37,19 @@ jobs:
3537
- name: MegaLinter
3638
id: ml
3739
# You can override MegaLinter flavor used to have faster performances
38-
# More info at https://megalinter.io/flavors/
40+
# More info at https://megalinter.io/latest/flavors/
3941
uses: oxsecurity/megalinter/flavors/python@beta
4042
env:
4143
# All available variables are described in documentation
42-
# https://megalinter.io/config-file/
44+
# https://megalinter.io/latest/config-file/
4345
VALIDATE_ALL_CODEBASE: true # Set ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} to validate only diff with main branch
4446
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4547
# ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
4648

4749
# Upload MegaLinter artifacts
4850
- name: Archive production artifacts
4951
if: success() || failure()
50-
uses: actions/upload-artifact@v4
52+
uses: actions/upload-artifact@v6
5153
with:
5254
name: MegaLinter reports
5355
path: |
@@ -58,7 +60,7 @@ jobs:
5860
- name: Create Pull Request with applied fixes
5961
id: cpr
6062
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
61-
uses: peter-evans/create-pull-request@v6
63+
uses: peter-evans/create-pull-request@v8
6264
with:
6365
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
6466
commit-message: "[MegaLinter] Apply linters automatic fixes"
@@ -76,7 +78,7 @@ jobs:
7678
run: sudo chown -Rc $UID .git/
7779
- name: Commit and push applied linter fixes
7880
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
79-
uses: stefanzweifel/git-auto-commit-action@v5
81+
uses: stefanzweifel/git-auto-commit-action@v7
8082
with:
8183
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
8284
commit_message: "[MegaLinter] Apply linters fixes"

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
os: [ubuntu-latest]
1515
runs-on: ${{ matrix.os }}
1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
17+
- uses: actions/checkout@v6
18+
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Run image
22-
uses: abatilo/actions-poetry@v2.4.0
22+
uses: abatilo/actions-poetry@v4.0.0
2323
with:
2424
poetry-version: ${{ matrix.poetry-version }}
2525
- name: Publish
@@ -38,7 +38,7 @@ jobs:
3838
packages: write
3939
steps:
4040
- name: Check out the repo
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@v6
4242

4343
- name: Set up QEMU
4444
uses: docker/setup-qemu-action@v3
@@ -63,7 +63,7 @@ jobs:
6363
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}
6464

6565
- name: Build & Push Docker Image
66-
uses: docker/build-push-action@v5
66+
uses: docker/build-push-action@v6
6767
with:
6868
context: .
6969
file: Dockerfile

.mega-linter.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration file for MegaLinter
2-
# See all available variables at https://megalinter.io/config-file/ and in linters documentation
2+
# See all available variables at https://megalinter.io/latest/config-file/ and in linters documentation
33

44
APPLY_FIXES: all # all, none, or list of linter keys
55
# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling-formats will be disabled by default
@@ -16,6 +16,7 @@ DISABLE_ERRORS_LINTERS:
1616
- PYTHON_MYPY
1717
- PYTHON_PYRIGHT
1818
- REPOSITORY_GRYPE
19+
- SPELL_LYCHEE
1920
FILTER_REGEX_EXCLUDE: (assets)
2021
SHOW_ELAPSED_TIME: true
2122
FILEIO_REPORTER: false

.safety-policy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
version: "3.0"
2+
3+
scanning-settings:
4+
max-depth: 6
5+
exclude: []
6+
include-files: []
7+
system:
8+
targets: []
9+
10+
report:
11+
dependency-vulnerabilities:
12+
enabled: true
13+
auto-ignore-in-report:
14+
python:
15+
environment-results: true
16+
unpinned-requirements: true
17+
vulnerabilities:
18+
"51457":
19+
reason: Legacy ignore migrated from Safety 2.x `-i 51457` flag
20+
expires: "2099-12-31"
21+
specifications: []
22+
cvss-severity: []
23+
24+
fail-scan-with-exit-code:
25+
dependency-vulnerabilities:
26+
enabled: true
27+
fail-on-any-of:
28+
cvss-severity:
29+
- high
30+
- medium
31+
- critical
32+
exploitability:
33+
- high
34+
- medium
35+
- critical
36+
37+
security-updates:
38+
dependency-vulnerabilities:
39+
auto-security-updates-limit:
40+
- patch
41+
42+
installation:
43+
default-action: allow
44+
audit-logging:
45+
enabled: true
46+
allow:
47+
packages: []
48+
vulnerabilities: {}
49+
deny:
50+
packages: {}
51+
vulnerabilities:
52+
warning-on-any-of:
53+
cvss-severity: []
54+
block-on-any-of:
55+
cvss-severity: []

.safety-project.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[project]
2+
id = github-dependents-info
3+
url = /codebases/github-dependents-info/findings
4+
name = github-dependents-info
5+

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## Beta
88

9-
- Add your updates here :)
9+
- Upgrade project
10+
- Upgrade dependencies
11+
- Fix total dependents count (#607)
12+
- Refactor update logic in sources_all_df to ensure proper data type handling
13+
- CI
14+
- Upgrade MegaLinter
15+
- Refactor test classes so they run faster
1016

1117
## [1.6.3] 2023-03-03
1218

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
FROM python:3.12.2-alpine3.18
1+
FROM python:3.12.3-alpine3.18
22
WORKDIR /
33
ARG GITHUB_DEPENDENTS_INFO_VERSION=latest
4-
ARG GITHUB_TOKEN
54

65
RUN pip install --no-cache-dir github-dependents-info
76

0 commit comments

Comments
 (0)