Skip to content

Commit

Permalink
[StepSecurity] Apply security best practices (#1299)
Browse files Browse the repository at this point in the history
Signed-off-by: StepSecurity Bot <[email protected]>
  • Loading branch information
step-security-bot authored Dec 13, 2023
1 parent 1085e2e commit 51cd1e8
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

- package-ecosystem: pip
directory: /doc
schedule:
interval: daily

- package-ecosystem: docker
directory: /heat/core/tests
schedule:
interval: daily
78 changes: 78 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
schedule:
- cron: "0 0 * * 1"

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["python"]
# CodeQL supports [ $supported-codeql-languages ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@305f6546310b9203e892c28c1484e82977f4f63d # v2.22.10
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@305f6546310b9203e892c28c1484e82977f4f63d # v2.22.10

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@305f6546310b9203e892c28c1484e82977f4f63d # v2.22.10
with:
category: "/language:${{matrix.language}}"
27 changes: 27 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Dependency Review'
uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # v2.5.1

1 comment on commit 51cd1e8

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 51cd1e8 Previous: 1085e2e Ratio
matmul_split_0_N1_GPU - GPU_UTIL 53.11900939941406 % (38.629447423223716) 16.787958991527557 % (19.49687762510319) 3.16
matmul_split_1_N1_GPU - GPU_UTIL 53.13075332641601 % (38.61690658286117) 16.801655316352843 % (19.487093847893384) 3.16
qr_split_0_N1_GPU - GPU_UTIL 53.24170093536377 % (38.49981984180257) 16.871353006362916 % (19.439761277311536) 3.16
qr_split_1_N1_GPU - GPU_UTIL 53.303184509277344 % (38.43602179745406) 16.981942224502564 % (19.36938814785307) 3.14
lanczos_N1_GPU - GPU_UTIL 53.30352783203125 % (38.43566773862438) 17.039488339424132 % (19.335576631815822) 3.13
hierachical_svd_rank_N1_GPU - GPU_UTIL 53.30361318588257 % (38.43557971944295) 17.043552899360655 % (19.333334555542674) 3.13
hierachical_svd_tol_N1_GPU - GPU_UTIL 53.303973865509036 % (38.435207793545224) 17.04372582435608 % (19.333213940058393) 3.13
kmeans_N1_GPU - GPU_UTIL 53.29909133911133 % (38.43996661956794) 17.060239219665526 % (19.326669997554607) 3.12
kmedians_N1_GPU - GPU_UTIL 53.18581190109253 % (38.55340350872266) 17.392176818847656 % (19.209354319636436) 3.06
kmedoids_N1_GPU - GPU_UTIL 57.41894760131836 % (35.320392071846605) 17.560688662528992 % (19.15718253432203) 3.27
reshape_N1_GPU - GPU_UTIL 62.42401885986328 % (36.796612261162196) 17.87260341644287 % (18.976236284983536) 3.49
concatenate_N1_GPU - GPU_UTIL 62.4260986328125 % (36.798487584136) 17.87380657196045 % (18.975560847212225) 3.49
apply_inplace_standard_scaler_and_inverse_N1_GPU - GPU_UTIL 62.440164184570314 % (36.811195689213754) 17.881946849823 % (18.97102014858303) 3.49
apply_inplace_min_max_scaler_and_inverse_N1_GPU - GPU_UTIL 62.4508056640625 % (36.82083939233597) 17.887370586395264 % (18.96793817572903) 3.49
apply_inplace_max_abs_scaler_and_inverse_N1_GPU - GPU_UTIL 62.45301513671875 % (36.82284485162839) 17.888576364517213 % (18.967305324219588) 3.49
apply_inplace_robust_scaler_and_inverse_N1_GPU - GPU_UTIL 64.41230239868165 % (33.81265746906465) 18.87999048233032 % (17.708117872309906) 3.41
apply_inplace_normalizer_N1_GPU - GPU_UTIL 61.93511962890625 % (38.25692647741884) 17.43804931640625 % (19.082656155118116) 3.55
heat_benchmarks_N4_CPU - ENERGY 0.6645139587402343 kJ (0.5009199233195825) 0.26259393768310546 kJ (0.23166169233741157) 2.53
matmul_split_0_N4_CPU - GPU_UTIL 3.2830789402127265 % (1.2664447949081803) 0.70343017578125 % 4.67
matmul_split_1_N4_CPU - GPU_UTIL 3.3117653876543045 % (1.2106038347705743) 0.70343017578125 % 4.71
qr_split_0_N4_CPU - POWER 18.660189550753508 W (15.389795618616795) 8.454448908025311 W (2.043286822292291) 2.21
qr_split_0_N4_CPU - GPU_UTIL 3.6335755944252015 % (0.9723127651078997) 0.7152974888682365 % (0.03560193926095963) 5.08
qr_split_1_N4_CPU - POWER 22.26618537880758 W (18.046220631916277) 11.008531555911956 W (10.260692708076151) 2.02
qr_split_1_N4_CPU - GPU_UTIL 3.8721483826637266 % (1.469878212987162) 0.7694724857807159 % (0.19812692999839782) 5.03
lanczos_N4_CPU - POWER 22.252441013042436 W (18.292596751585403) 10.935187003783673 W (10.670371932294632) 2.03
lanczos_N4_CPU - GPU_UTIL 3.969846859574318 % (2.0018772266576463) 0.76812744140625 % (0.194091796875) 5.17
hierachical_svd_rank_N4_CPU - POWER 22.623468105659775 W (18.732898021371124) 10.91232138742279 W (10.67776863166592) 2.07
hierachical_svd_rank_N4_CPU - GPU_UTIL 3.9576132863759996 % (2.0187690105333878) 0.76812744140625 % (0.194091796875) 5.15
hierachical_svd_tol_N4_CPU - POWER 22.694139826092965 W (18.823331672345272) 10.906509602185606 W (10.679778200964632) 2.08
hierachical_svd_tol_N4_CPU - GPU_UTIL 3.9426020324230193 % (2.0428714846519114) 0.76812744140625 % (0.194091796875) 5.13
kmeans_N4_CPU - POWER 22.312247713376173 W (18.54273825797665) 10.906338653523147 W (10.67974754435314) 2.05
kmeans_N4_CPU - GPU_UTIL 3.90753630399704 % (2.1005253977451694) 0.7601008504629135 % (0.17001202404499055) 5.14
kmedians_N4_CPU - GPU_UTIL 3.90386962890625 % (2.116308177479547) 0.7439259439706802 % (0.12148730456829071) 5.25
kmedoids_N4_CPU - GPU_UTIL 3.90533447265625 % (2.1197962296145456) 0.7726089626550674 % (0.2075363606214523) 5.05
reshape_N4_CPU - GPU_UTIL 3.9062873885035514 % (2.118358311720064) 0.779588571190834 % (0.22847518622875213) 5.01
concatenate_N4_CPU - POWER 22.426249927967053 W (18.113589640652528) 10.967322522590145 W (10.903654404605476) 2.04
concatenate_N4_CPU - GPU_UTIL 3.8830078125 % (2.0785554202134167) 0.7790321618318558 % (0.2268059581518173) 4.98
apply_inplace_standard_scaler_and_inverse_N4_CPU - POWER 23.258974324821345 W (17.90213513322008) 10.915693994323385 W (10.842772086337119) 2.13
apply_inplace_standard_scaler_and_inverse_N4_CPU - GPU_UTIL 3.8258593291044236 % (2.026234070328382) 0.7725100547075272 % (0.20723963677883148) 4.95
apply_inplace_min_max_scaler_and_inverse_N4_CPU - POWER 23.301509221018296 W (17.89698194664157) 10.914311321335532 W (10.840612317219673) 2.13
apply_inplace_min_max_scaler_and_inverse_N4_CPU - GPU_UTIL 3.8253028333187102 % (2.024387465883589) 0.7722950041294098 % (0.20659448504447936) 4.95
apply_inplace_max_abs_scaler_and_inverse_N4_CPU - POWER 23.315332639174585 W (17.89526798507515) 10.913982979223702 W (10.839593700654413) 2.14
apply_inplace_max_abs_scaler_and_inverse_N4_CPU - GPU_UTIL 3.8251906603574755 % (2.0237836361141346) 0.7722016125917435 % (0.2063143104314804) 4.95
apply_inplace_robust_scaler_and_inverse_N4_CPU - GPU_UTIL 3.9098507910966873 % (2.003901734534187) 0.7361845403909684 % (0.09826309382915496) 5.31
apply_inplace_normalizer_N4_CPU - GPU_UTIL 3.94683837890625 % (2.2544641845465696) 0.70343017578125 % 5.61

This comment was automatically generated by workflow using github-action-benchmark.

CC: @web-flow

Please sign in to comment.