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

Test branch #6

Open
wants to merge 140 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
541b81d
64 Commit
DeeptiYadav1 Jan 19, 2023
e963c9b
80 Commit
DeeptiYadav1 Jan 27, 2023
3635c90
81 Commit
DeeptiYadav1 Jan 27, 2023
88dc55d
Merge branch 'main' into test-branch
DeeptiYadav1 Jan 27, 2023
2d58d8f
82 Commit
DeeptiYadav1 Feb 17, 2023
7fa61cc
Merge branch 'test-branch' of https://github.com/DeeptiYadav1/sca-tes…
DeeptiYadav1 Feb 17, 2023
8892023
Update Gemfile
DeeptiYadav1 Feb 17, 2023
3a83f5f
83 Commit
DeeptiYadav1 Feb 22, 2023
a438a90
Merge branch 'test-branch' of https://github.com/DeeptiYadav1/sca-tes…
DeeptiYadav1 Feb 22, 2023
dcc2c58
84 Commit
DeeptiYadav1 Feb 22, 2023
edb3210
85 Commit
DeeptiYadav1 Feb 22, 2023
efa9e14
86 Commit
DeeptiYadav1 Feb 22, 2023
3ec041a
87 Commit
DeeptiYadav1 Feb 22, 2023
9df1fe5
88 Commit
DeeptiYadav1 Feb 22, 2023
c7ce33e
89 Commit
DeeptiYadav1 Feb 22, 2023
ed701df
90 Commit
DeeptiYadav1 Feb 22, 2023
0d43fe0
91 Commit
DeeptiYadav1 Feb 22, 2023
6fd943e
92 Commit
DeeptiYadav1 Feb 22, 2023
0108c89
93 Commit
DeeptiYadav1 Feb 22, 2023
61f114d
94 Commit
DeeptiYadav1 Feb 22, 2023
ea58be5
95 Commit
DeeptiYadav1 Feb 22, 2023
5250286
96 Commit
DeeptiYadav1 Feb 22, 2023
6e3ffb9
97 Commit
DeeptiYadav1 Feb 23, 2023
1c12f4b
98 Commit
DeeptiYadav1 Feb 23, 2023
3731076
99 Commit
DeeptiYadav1 Feb 23, 2023
9814736
100 Commit
DeeptiYadav1 Feb 23, 2023
54503b4
101 Commit
DeeptiYadav1 Feb 23, 2023
f528655
102 Commit
DeeptiYadav1 Feb 23, 2023
a5cec8f
103 Commit
DeeptiYadav1 Feb 23, 2023
7b6713d
104 Commit
DeeptiYadav1 Feb 23, 2023
7fc703d
105 Commit
DeeptiYadav1 Feb 23, 2023
2f8ec23
106 Commit
DeeptiYadav1 Feb 23, 2023
3ae6a34
107 Commit
DeeptiYadav1 Feb 23, 2023
825bd71
108 Commit
DeeptiYadav1 Feb 23, 2023
be0cbc6
109 Commit
DeeptiYadav1 Feb 23, 2023
055d446
110 Commit
DeeptiYadav1 Feb 23, 2023
6a7c8fc
111 Commit
DeeptiYadav1 Feb 23, 2023
658aa0b
112 Commit
DeeptiYadav1 Feb 23, 2023
cc902d2
113 Commit
DeeptiYadav1 Feb 23, 2023
c071008
114 Commit
DeeptiYadav1 Feb 23, 2023
710a25b
115 Commit
DeeptiYadav1 Feb 23, 2023
b62d811
116 Commit
DeeptiYadav1 Feb 23, 2023
70700c2
117 Commit
DeeptiYadav1 Feb 23, 2023
f0a8eda
118 Commit
DeeptiYadav1 Feb 23, 2023
eb9c45a
119 Commit
DeeptiYadav1 Feb 23, 2023
6f2affb
120 Commit
DeeptiYadav1 Feb 23, 2023
a593ed4
121 Commit
DeeptiYadav1 Feb 23, 2023
fbfcd42
122 Commit
DeeptiYadav1 Feb 23, 2023
850039d
123 Commit
DeeptiYadav1 Feb 23, 2023
a8673ca
testing pr text
DeeptiYadav1 Feb 23, 2023
2772a50
testing pr text for existing pr
DeeptiYadav1 Feb 23, 2023
500c85a
testing pr text for existing pr 2
DeeptiYadav1 Feb 23, 2023
2226e73
testing pr text for existing pr 3
DeeptiYadav1 Feb 23, 2023
fd85752
Testing workflow_call trigger
DeeptiYadav1 Mar 1, 2023
3d838f4
Testing workflow_call trigger 1
DeeptiYadav1 Mar 1, 2023
dbe14dc
Testing workflow_call trigger 2
DeeptiYadav1 Mar 1, 2023
b861ef3
Testing workflow_call trigger 3
DeeptiYadav1 Mar 1, 2023
df45d6a
Testing repo_dispatch
DeeptiYadav1 Mar 1, 2023
9b1f220
Adding workflow dispatch to test
DeeptiYadav1 Mar 1, 2023
7f8e5dc
Adding workflow dispatch to test-b
DeeptiYadav1 Mar 1, 2023
e4c7d4a
Adding workflow dispatch to test-b 2
DeeptiYadav1 Mar 1, 2023
ea0cb4b
Adding workflow dispatch to test-b 3
DeeptiYadav1 Mar 1, 2023
6b56dd3
Adding workflow dispatch to test-b 4
DeeptiYadav1 Mar 1, 2023
f14b560
Finding PR number
DeeptiYadav1 Mar 2, 2023
0ada693
Merge branch 'main' into test-branch
DeeptiYadav1 Mar 2, 2023
822eaec
Finding PR number1
DeeptiYadav1 Mar 2, 2023
103eb42
Merge branch 'test-branch' of https://github.com/DeeptiYadav1/sca-tes…
DeeptiYadav1 Mar 2, 2023
b802ec6
Finding PR number5
DeeptiYadav1 Mar 2, 2023
135569a
Printing to specified PR
DeeptiYadav1 Mar 2, 2023
8c0ff91
Printing to specified PR 1
DeeptiYadav1 Mar 2, 2023
931d56a
Printing to specified PR 2
DeeptiYadav1 Mar 2, 2023
2dcdcec
branch and repo
DeeptiYadav1 Mar 10, 2023
9f6cdf4
branch and repo1
DeeptiYadav1 Mar 10, 2023
794c612
branch and repo2
DeeptiYadav1 Mar 10, 2023
2d319d3
branch and repo3
DeeptiYadav1 Mar 10, 2023
499bf33
branch and repo3
DeeptiYadav1 Mar 10, 2023
6ffc9dd
branch and repo3
DeeptiYadav1 Mar 10, 2023
b02d21e
branch and repo3
DeeptiYadav1 Mar 10, 2023
32c4ea4
branch and repo3
DeeptiYadav1 Mar 10, 2023
3445ccd
branch and repo3
DeeptiYadav1 Mar 10, 2023
04af386
branch and repo3
DeeptiYadav1 Mar 10, 2023
0773fca
branch and repo3
DeeptiYadav1 Mar 10, 2023
3126077
branch and repo3
DeeptiYadav1 Mar 10, 2023
15c8d36
branch and repo3
DeeptiYadav1 Mar 10, 2023
eb9f25a
branch and repo3
DeeptiYadav1 Mar 10, 2023
c5d557e
branch and repo3
DeeptiYadav1 Mar 10, 2023
3c9adea
branch and repo3
DeeptiYadav1 Mar 10, 2023
7c6bfa5
branch and repo3
DeeptiYadav1 Mar 10, 2023
c4bcabf
branch and repo3
DeeptiYadav1 Mar 10, 2023
183e3d2
branch and repo3
DeeptiYadav1 Mar 10, 2023
3a814eb
complete flow
DeeptiYadav1 Mar 10, 2023
59614aa
complete flow
DeeptiYadav1 Mar 10, 2023
aa56de2
complete flow
DeeptiYadav1 Mar 10, 2023
c6ecd38
Added snyktest.yml
DeeptiYadav1 Mar 23, 2023
15f244f
SNYK 1
DeeptiYadav1 Mar 23, 2023
fba4a59
SNYK 2
DeeptiYadav1 Mar 23, 2023
3e6df0e
SNYK 3
DeeptiYadav1 Mar 23, 2023
a2ffc75
SNYK 3
DeeptiYadav1 Mar 23, 2023
a627532
SNYK 3
DeeptiYadav1 Mar 23, 2023
ac62043
SNYK 4
DeeptiYadav1 Mar 23, 2023
b14356c
SNYK 5
DeeptiYadav1 Mar 23, 2023
24c039f
SNYK 5
DeeptiYadav1 Mar 23, 2023
1770e5e
SNYK 5
DeeptiYadav1 Mar 23, 2023
16fe3ec
SNYK 6
DeeptiYadav1 Mar 23, 2023
bb99df0
SNYK 7
DeeptiYadav1 Mar 23, 2023
06ff9f3
SNYK 7
DeeptiYadav1 Mar 23, 2023
43cab96
SNYK 8
DeeptiYadav1 Mar 24, 2023
2b9907b
SNYK 9
DeeptiYadav1 Mar 31, 2023
207c67e
SNYK 10
DeeptiYadav1 Mar 31, 2023
6708d60
SNYK 10
DeeptiYadav1 Mar 31, 2023
43effde
SNYK 11
DeeptiYadav1 Mar 31, 2023
d758469
SNYK 11
DeeptiYadav1 Mar 31, 2023
83a1938
SNYK 11
DeeptiYadav1 Mar 31, 2023
1b12e1b
SNYK 12
DeeptiYadav1 Apr 4, 2023
a18fd39
SNYK 12
DeeptiYadav1 Apr 4, 2023
302078b
SNYK 12
DeeptiYadav1 Apr 4, 2023
af267c3
SNYK 12
DeeptiYadav1 Apr 4, 2023
b600fd6
SNYK 12
DeeptiYadav1 Apr 4, 2023
6155513
SNYK 12
DeeptiYadav1 Apr 4, 2023
3585f2b
SNYK 12
DeeptiYadav1 Apr 4, 2023
5d24423
SNYK 12
DeeptiYadav1 Apr 4, 2023
a20d21e
SNYK 12
DeeptiYadav1 Apr 5, 2023
9a61de9
SNYK 12
DeeptiYadav1 Apr 5, 2023
1366e1a
SNYK 12
DeeptiYadav1 Apr 5, 2023
0714fc2
SNYK 12
DeeptiYadav1 Apr 6, 2023
a7d0f91
SNYK 12
DeeptiYadav1 Apr 6, 2023
782d122
SNYK 13
DeeptiYadav1 Apr 12, 2023
cb57bfe
SNYK 13
DeeptiYadav1 Apr 12, 2023
7b5ee4a
SNYK 14
DeeptiYadav1 Apr 12, 2023
5ebad35
SNYK 14
DeeptiYadav1 Apr 12, 2023
0bb04c9
SNYK 14
DeeptiYadav1 Apr 13, 2023
c28e6da
SNYK 14
DeeptiYadav1 Apr 13, 2023
b42fb58
SNYK 14
DeeptiYadav1 Apr 13, 2023
3d333a5
SNYK 14
DeeptiYadav1 Apr 13, 2023
6b8b5f8
snyk 15
DeeptiYadav1 Apr 17, 2023
58ead57
snyk 15
DeeptiYadav1 Apr 17, 2023
f429850
snyk 15
DeeptiYadav1 Apr 17, 2023
3dc88cd
snyk 16
DeeptiYadav1 Apr 17, 2023
2e3d5fb
snyk 16
DeeptiYadav1 Apr 17, 2023
e5b1de6
snyk 17
DeeptiYadav1 Apr 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 49 additions & 7 deletions .github/workflows/commitid.yml
Expand Up @@ -2,11 +2,11 @@ name: Send Branch name and Commit Id
env:
GITHUB_CONTEXT: ${{ toJson(github) }}

#trigger

on:
pull_request:
branches:
- '**'
branches: [main, test-branch]


jobs:
senddetails:
Expand All @@ -15,8 +15,50 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Run a echo command
- name: send data
shell: bash
run: echo "$GITHUB_CONTEXT"| grep -i 'after\|ref_name' >> sha.txt
- name: send sha file
run: curl -X POST -m 10 -d @sha.txt https://54c5-49-207-214-169.in.ngrok.io
run: |
export SHA=$(echo "$GITHUB_CONTEXT"| grep -i 'after'| awk '{print substr($2,2,length($2)-3)}')
export REPO=$(echo "$GITHUB_CONTEXT"| grep -m 1 -i '"name":'| awk '{print substr($2,2,length($2)-3)}')
curl -X POST -H "Content-Type: application/json" -d '{"sha" :"'"$SHA"'", "repo" :"'"$REPO"'"}' https://1a5b-2405-201-20-caf-5574-63e3-2550-57dd.in.ngrok.io/commit

fetchresults:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: fetch results from api
shell: bash
run: |
sleep 40s
export SHA=$(echo "$GITHUB_CONTEXT"| grep -i 'after'| awk '{print substr($2,2,length($2)-3)}')
export PR=$(echo "$GITHUB_CONTEXT"| grep -m 1 -i '"number":'|awk '{print substr($2,1,length($2)-1)}')
export REPO=$(echo "$GITHUB_CONTEXT"| grep -m 1 -i '"name":'| awk '{print substr($2,2,length($2)-3)}')
export BRANCH=$(echo "$GITHUB_CONTEXT"| grep -i '"head_ref":'| awk '{print substr($2,2,length($2)-3)}')
curl -X GET --retry 10 --retry-delay 5 'https://1a5b-2405-201-20-caf-5574-63e3-2550-57dd.in.ngrok.io/commit/'"${SHA}"'?repo='"${REPO}"'&branch='"${BRANCH}"'&pr='"${PR}" >> result.txt
cat result.txt
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
filePath: result.txt



# export REPO=$(echo "$GITHUB_CONTEXT"| grep -m 1 -i '"name":'| awk '{print substr($2,2,length($2)-3)}')
# echo $REPO
# export PR=$(echo "$GITHUB_CONTEXT"| grep -i '"number":'| awk '{print substr($4,1,length($4)-1)}')
# echo $PR
# export SHA=$(echo "$GITHUB_CONTEXT"| grep -i 'after'| awk '{print substr($2,2,length($2)-3)}')
# echo $SHA

# export An=$(echo "$GITHUB_CONTEXT"| grep -i '"number":'| awk '{print substr($2,2,length($2)-3)}')
# curl -X POST -H "Content-Type: application/json" -d '{"sha" :"'"$A"'"}' https://d11c-2409-4042-4e1f-a89a-d822-d0d9-2168-540d.in.ngrok.io/commit
# export SHA=$(echo "$GITHUB_CONTEXT"| grep -i 'after'| awk '{print substr($2,2,length($2)-3)}')
# export PR=$(echo "$GITHUB_CONTEXT"| grep -i '"number":'| awk '{print substr($4,1,length($4)-1)}')
# export REPO=$(echo "$GITHUB_CONTEXT"| grep -i '"name":'| awk '{print substr($2,2,length($2)-3)}')
# echo $SHA
# echo $P
# echo $REPO


43 changes: 43 additions & 0 deletions .github/workflows/reusabe.yml
@@ -0,0 +1,43 @@
name: Retry Get Results Request

on:
workflow_dispatch:
inputs:
shavalue:
description: 'sha-value'
required: true
type: string
prnumber:
description: 'pr-number'
required: true
type: int



jobs:

fetchresults:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: fetch results from api
shell: bash
env:
SHA: ${{ inputs.shavalue }}
run: |
sleep 5s
curl -X GET --retry 10 --retry-delay 5 'https://1a5b-2405-201-20-caf-5574-63e3-2550-57dd.in.ngrok.io/commit/'"${SHA}" >> result.txt
cat result.txt
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
filePath: result.txt
pr_number: ${{ inputs.prnumber }}






30 changes: 30 additions & 0 deletions .github/workflows/snyktest.yml
@@ -0,0 +1,30 @@
name: Snyk Scan

on:
pull_request:
branches: [main, test-branch]


jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/ruby@master
continue-on-error: true # To make sure that SARIF upload gets called
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --json-file-output=snyk.json
- name: Parse Json
run: |
sudo apt-get install -y jq
jq -r '.vulnerabilities[] | {id, moduleName, title, description, severity, cvssScore, from, Url: .references[0].url, fixedIn}' snyk.json > output.txt

- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
filePath: output.txt


13 changes: 13 additions & 0 deletions Gemfile
@@ -0,0 +1,13 @@
# frozen_string_literal: true

source "https://rubygems.org"

gem "rake", "11.1.2"

gem "rspec", "~> 3.0"
gem "rspec-github", require: false
gem "oauth2", "1.4.1"
gem "rubocop", "~> 1.21"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "gemsurance"
90 changes: 90 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,90 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
diff-lcs (1.5.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
gems (1.2.0)
gemsurance (0.10.0)
bundler (>= 1.2, < 3.0)
gems (>= 0.8)
git (~> 1.2)
git (1.18.0)
addressable (~> 2.8)
rchardet (~> 1.8)
json (2.6.3)
jwt (2.7.0)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.3.0)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
parallel (1.22.1)
parser (3.2.1.1)
ast (~> 2.4.1)
public_suffix (5.0.1)
rack (2.2.6.4)
rainbow (3.1.1)
rake (11.1.2)
rchardet (1.8.0)
regexp_parser (2.7.0)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.1)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-github (2.4.0)
rspec-core (~> 3.0)
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.48.1)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.26.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.17.1)
rubocop (~> 1.41)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.19.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
ruby-progressbar (1.13.0)
unicode-display_width (2.4.2)

PLATFORMS
arm64-darwin-21

DEPENDENCIES
gemsurance
oauth2 (= 1.4.1)
rake (= 11.1.2)
rspec (~> 3.0)
rspec-github
rubocop (~> 1.21)
rubocop-rake
rubocop-rspec

BUNDLED WITH
2.4.8