Skip to content

Commit 2f0e053

Browse files
Merge pull request #10 from IntelPython/add-openssf-scorecard
2 parents 3025b1b + 535e68a commit 2f0e053

File tree

5 files changed

+105
-5
lines changed

5 files changed

+105
-5
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @oleksandr-pavlyk @xaleryb @ekomarova

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/conda-package.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177
uses: actions/upload-artifact@v3
178178
with:
179179
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
180-
path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2
180+
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
181181

182182
test_windows:
183183
needs: build_windows
@@ -200,11 +200,14 @@ jobs:
200200
uses: actions/download-artifact@v3
201201
with:
202202
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
203+
203204
- uses: conda-incubator/setup-miniconda@v3
204205
with:
206+
auto-update-conda: true
207+
conda-build-version: '*'
205208
miniforge-variant: Miniforge3
206209
miniforge-version: latest
207-
activate-environment: build
210+
activate-environment: mkl_umath_test
208211
channels: conda-forge
209212
python-version: ${{ matrix.python }}
210213

@@ -219,14 +222,19 @@ jobs:
219222
- name: Index the channel
220223
shell: cmd /C CALL {0}
221224
run: |
222-
conda activate
223225
conda index ${{ env.workdir }}\channel
224226
227+
- name: Dump mkl_umath version info from created channel to STDOUT
228+
shell: cmd /C CALL {0}
229+
run: |
230+
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json
225231
- name: Dump mkl_umath version info from created channel into ver.json
226232
shell: cmd /C CALL {0}
227233
run: |
228-
conda activate
229234
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
235+
- name: Output content of workdir
236+
shell: pwsh
237+
run: Get-ChildItem -Path ${{ env.workdir }}
230238
- name: Output content of produced ver.json
231239
shell: pwsh
232240
run: Get-Content -Path ${{ env.workdir }}\ver.json
@@ -240,7 +248,6 @@ jobs:
240248
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
241249
SET PACKAGE_VERSION=%%F
242250
)
243-
conda activate
244251
conda install -n mkl_umath_test ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
245252
- name: Display lockfile content
246253
shell: pwsh
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '28 2 * * 1'
14+
- cron: '28 2 * * 4'
15+
push:
16+
branches: [ "master" ]
17+
18+
# Declare default permissions as read only.
19+
permissions: read-all
20+
21+
jobs:
22+
analysis:
23+
name: Scorecard analysis
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 30
26+
permissions:
27+
# Needed to upload the results to code-scanning dashboard.
28+
security-events: write
29+
# Needed to publish results and get a badge (see publish_results below).
30+
id-token: write
31+
# Uncomment the permissions below if installing in a private repository.
32+
# contents: read
33+
# actions: read
34+
35+
steps:
36+
- name: "Checkout code"
37+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
38+
with:
39+
persist-credentials: false
40+
41+
- name: "Run analysis"
42+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
43+
with:
44+
results_file: results.sarif
45+
results_format: sarif
46+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
47+
# - you want to enable the Branch-Protection check on a *public* repository, or
48+
# - you are installing Scorecard on a *private* repository
49+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
50+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
51+
52+
# Public repositories:
53+
# - Publish results to OpenSSF REST API for easy access by consumers
54+
# - Allows the repository to include the Scorecard badge.
55+
# - See https://github.com/ossf/scorecard-action#publishing-results.
56+
# For private repositories:
57+
# - `publish_results` will always be set to `false`, regardless
58+
# of the value entered here.
59+
publish_results: true
60+
61+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
62+
# format to the repository Actions tab.
63+
- name: "Upload artifact"
64+
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
65+
with:
66+
name: SARIF file
67+
path: results.sarif
68+
retention-days: 14
69+
70+
# Upload the results to GitHub's code scanning dashboard.
71+
- name: "Upload to code-scanning"
72+
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
73+
with:
74+
sarif_file: results.sarif

SECURITY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Security Policy
2+
3+
## Report a Vulnerability
4+
5+
Please report security issues or vulnerabilities to the [Intel® Security Center].
6+
7+
For more information on how Intel® works to resolve security issues, see
8+
[Vulnerability Handling Guidelines].
9+
10+
[Intel® Security Center]:https://www.intel.com/content/www/us/en/security-center/default.html
11+
12+
[Vulnerability Handling Guidelines]:https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html

0 commit comments

Comments
 (0)