Merge branch 'main' into patch-1

This commit is contained in:
Sampark Sharma
2022-06-21 14:09:46 +05:30
committed by GitHub
8 changed files with 131 additions and 3 deletions
+35
View File
@@ -0,0 +1,35 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow lets you compile your Go project using a SLSA3 compliant builder.
# This workflow will generate a so-called "provenance" file describing the steps
# that were performed to generate the final binary.
# The project is an initiative of the OpenSSF (openssf.org) and is developed at
# https://github.com/slsa-framework/slsa-github-generator.
# The provenance file can be verified using https://github.com/slsa-framework/slsa-verifier.
# For more information about SLSA and how it improves the supply-chain, visit slsa.dev.
name: SLSA Go releaser
on:
workflow_dispatch:
release:
types: [created]
permissions: read-all
jobs:
build:
permissions:
id-token: write # To sign.
contents: write # To upload release assets.
actions: read # To read workflow path.
# If you need more configuration options, such as ldflag examples,
# visit https://github.com/slsa-framework/slsa-github-generator#golang-projects.
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.0.0
with:
# By default, the config file is .slsa-goreleaser.yml in the root directory.
# The format of the config file is described in
# https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/go/README.md#configuration-file.
go-version: 1.17
+2 -2
View File
@@ -30,14 +30,14 @@ jobs:
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build with Gradle
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: publish
env:
+1 -1
View File
@@ -29,6 +29,6 @@ jobs:
java-version: '11'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
@@ -0,0 +1,7 @@
{
"name": "SLSA Go releaser",
"creator": "Open Source Security Foundation (OpenSSF)",
"description": "Compile your Go project using a SLSA3 compliant builder",
"iconName": "go-ossf-slsa3-publish",
"categories": ["Continuous integration", "Go"]
}
+52
View File
@@ -0,0 +1,52 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will initiate a Contrast Scan on your built artifact, and subsequently upload the results SARIF to Github.
# Because Contrast Scan is designed to run against your deployable artifact, you need to build an artifact that will be passed to the Contrast Scan Action.
# Contrast Scan currently supports Java, JavaScript and .NET artifacts.
# For more information about the Contrast Scan GitHub Action see here: https://github.com/Contrast-Security-OSS/contrastscan-action
# Pre-requisites:
# All Contrast related account secrets should be configured as GitHub secrets to be passed as inputs to the Contrast Scan Action.
# The required secrets are CONTRAST_API_KEY, CONTRAST_ORGANIZATION_ID and CONTRAST_AUTH_HEADER.
on:
push:
branches: [ $default-branch, $protected-branches ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ $default-branch ]
schedule:
- cron: $cron-weekly
permissions:
contents: read
name: Scan analyze workflow
jobs:
build-and-scan:
permissions:
contents: read # for actions/checkout
security-events: write # for github/codeql-action/upload-sarif
runs-on: ubuntu-latest
# check out project
steps:
- uses: actions/checkout@v3
# Since Contrast Scan is designed to run against your deployable artifact, the steps to build your artifact should go here.
# -name: Build Project
# ...
# Scan Artifact
- name: Contrast Scan Action
uses: Contrast-Security-OSS/contrastscan-action@7352a45d9678ec8a434cf061b07ffb51c1e351a1
with:
artifact: mypath/target/myartifact.jar # replace this path with the path to your built artifact
apiKey: ${{ secrets.CONTRAST_API_KEY }}
orgId: ${{ secrets.CONTRAST_ORGANIZATION_ID }}
authHeader: ${{ secrets.CONTRAST_AUTH_HEADER }}
#Upload the results to GitHub
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif # The file name must be 'results.sarif', as this is what the Github Action will output
@@ -0,0 +1,7 @@
{
"name": "Contrast Scan",
"creator": "Contrast Security Inc",
"description": "Scans Pull Requests on each push for the introduction and/or resolution of vulnerabilities to the repository.",
"iconName": "contrast",
"categories": ["Code Scanning", "java", "javascript", "dotnet"]
}
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 209.4 177.4" style="enable-background:new 0 0 209.4 177.4;" xml:space="preserve">
<style type="text/css">
.st0{fill:#004D45;}
.st1{fill:#0E9E53;}
.st2{fill:#FFFFFF;}
</style>
<path class="st0" d="M65.4,90.2c0,26.2,10.1,49.4,26.7,65.1c-2.6,0.2-5.3,0.4-8.1,0.4c-46.9,0-79.4-27.1-79.4-64.3
S37,27.1,83.9,27.1c1.9,0,3.7,0,5.4,0.1C74.3,42.9,65.4,65.4,65.4,90.2z"/>
<path class="st1" d="M203.9,39.5c2.2,14.3-8.8,26-27.4,26c-28.1,0-33-36.1-87.1-38.4C103,12.8,121.8,4,143.5,4c0.4,0,0.8,0,1.3,0
C176,4,201.5,23.9,203.9,39.5z"/>
<path class="st2" d="M187.7,117.9c7.2,1.4,16.5,6.4,16.5,21.4c0,20.9-32.5,36.4-59.5,36.7c0,0-0.1,0-0.1,0c0,0-0.1,0-0.1,0s0,0,0,0
c-20.6,0-38.7-7.8-52.4-20.7C139.6,151.3,161.9,112.9,187.7,117.9z"/>
</svg>

After

Width:  |  Height:  |  Size: 1003 B

+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg fill="none" version="1.1" viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(-31)" clip-path="url(#a)">
<path d="m161.53 3.0994e-5 0.385-0.43543-7.493-6.6222-3.311 3.7465c-0.989 1.1184-1.991 2.2222-3.008 3.3111h-117.1v7.7919l-6.8799 4.2403 2.6234 4.2565c1.3735 2.2285 2.7929 4.4196 4.2565 6.5724v93.421c-0.0339 1e-3 -0.0678 1e-3 -0.1018 2e-3l-4.9989 0.102 0.2035 9.998 4.8972-0.1v13.716h140v-88.684c1.44-2.0734 2.84-4.183 4.196-6.3282 2.279-3.4292 3.971-6.3613 5.103-8.4579 0.57-1.054 0.998-1.8986 1.29-2.4912 0.146-0.2964 0.258-0.5299 0.336-0.6953 0.039-0.0827 0.069-0.1484 0.091-0.1964l0.027-0.0587 9e-3 -0.0192 3e-3 -0.0071 1e-3 -0.0029 1e-3 -0.0013c0-6e-4 0-0.0011-4.557-2.0578l4.557 2.0567 2.057-4.5575-9.115-4.1132-2.054 4.5518v1e-3l-1e-3 9e-4 -1e-3 0.0017v2e-3l-8e-3 0.0174c-0.011 0.0234-0.03 0.0642-0.057 0.1216-0.054 0.115-0.141 0.2967-0.261 0.5399-0.239 0.4866-0.611 1.2188-1.116 2.155-0.155 0.2859-0.322 0.5907-0.501 0.9131v-32.69zm0 0h-13.427c-22.046 23.618-50.591 40.246-81.991 47.779-11.875-10.541-22.305-22.871-30.851-36.737l-2.6234-4.2565-1.6331 1.0065v15.069c8.7076 12.807 18.982 24.259 30.482 34.156 16.53 14.226 35.591 25.242 56.17 32.461-17.424 11.387-36.962 19.448-57.612 23.605-9.4774 1.907-19.19 2.992-29.04 3.199v10.002l0.1018-2e-3c10.484-0.213 20.823-1.365 30.911-3.396 25.403-5.113 49.217-15.796 69.786-31.09 15.01-11.161 28.292-24.779 39.201-40.48v-18.626c-0.996 1.7908-2.38 4.127-4.163 6.808l-0.033 0.0491-0.031 0.0498c-10.512 16.639-23.759 31.015-38.962 42.68-18.881-5.709-36.555-14.758-52.18-26.662 31.982-9.1292 60.827-27.25 82.969-52.304z" clip-rule="evenodd" fill="#f03100" fill-rule="evenodd"/>
</g>
<defs>
<clipPath id="a">
<path d="m31 28c0-15.464 12.536-28 28-28h84c15.464 0 28 12.536 28 28v84c0 15.464-12.536 28-28 28h-84c-15.464 0-28-12.536-28-28z" fill="#fff"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB