From 8b31e0d006d16296c987f5aa05632bcc2c9dd56c Mon Sep 17 00:00:00 2001 From: sandeep Date: Fri, 10 Sep 2021 17:41:35 +0530 Subject: [PATCH 1/6] Added CVE Annotation workflow --- .github/workflows/cve-annotate.yaml | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/cve-annotate.yaml diff --git a/.github/workflows/cve-annotate.yaml b/.github/workflows/cve-annotate.yaml new file mode 100644 index 0000000000..d29ea24563 --- /dev/null +++ b/.github/workflows/cve-annotate.yaml @@ -0,0 +1,45 @@ +name: ✍🏻 CVE Annotate + +on: + pull_request: + branches: + - master + workflow_dispatch: + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + with: + persist-credentials: false + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Generate CVE Annotations + id: cve-annotate + run: | + if ! which cve-annotate > /dev/null; then + echo -e "Command cve-annotate not found! Installing\c" + go install github.com/projectdiscovery/nuclei/v2/cmd/cve-annotate@dev + fi + cve-annotate -i ./cves/ -d . + echo "::set-output name=changes::$(git status -s | wc -l)" + + - name: Commit files + if: steps.cve-annotate.outputs.changes > 0 + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add cves + git commit -m "Auto Generated CVE annotations [$(date)] :robot:" -a + + - name: Push changes + if: steps.cve-annotate.outputs.changes > 0 + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} From 68abf454eb163a21324cf0e914fb011e323fd226 Mon Sep 17 00:00:00 2001 From: sandeep Date: Fri, 10 Sep 2021 17:47:08 +0530 Subject: [PATCH 2/6] misc update --- .github/workflows/template-validate.yml | 13 +++++-------- .github/workflows/templates-stats.yml | 17 +++++------------ 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/template-validate.yml b/.github/workflows/template-validate.yml index d0d3ede28e..95e3f9a597 100644 --- a/.github/workflows/template-validate.yml +++ b/.github/workflows/template-validate.yml @@ -6,13 +6,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout Repo - uses: actions/checkout@master - - - name: Setup golang - uses: actions/setup-go@v2 - with: - go-version: 1.14 + - uses: actions/checkout@master + - uses: actions/setup-go@v2 + with: + go-version: 1.17 #- name: Cache Go # id: cache-go @@ -26,7 +23,7 @@ jobs: env: GO111MODULE: on run: | - go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei + go install github.com/projectdiscovery/nuclei/v2/cmd/nuclei@dev shell: bash - name: Template Validation diff --git a/.github/workflows/templates-stats.yml b/.github/workflows/templates-stats.yml index 3fbb305a96..db02a5df05 100644 --- a/.github/workflows/templates-stats.yml +++ b/.github/workflows/templates-stats.yml @@ -11,21 +11,14 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'projectdiscovery/nuclei-templates' && github.ref == 'refs/heads/master' steps: - - name: Checkout Repo - uses: actions/checkout@master - with: - fetch-depth: 0 - - - name: Setup golang - uses: actions/setup-go@v2 - with: - go-version: 1.14 + - uses: actions/checkout@master + - uses: actions/setup-go@v2 + with: + go-version: 1.17 - name: Installing Template Stats - env: - GO111MODULE: on run: | - go get -v github.com/projectdiscovery/templates-stats@main + go install github.com/projectdiscovery/templates-stats@main shell: bash - name: Markdown Stats From a9d3acdd3d70efdf02f60e9f30e7482e87e0ac36 Mon Sep 17 00:00:00 2001 From: sandeep Date: Fri, 10 Sep 2021 17:48:49 +0530 Subject: [PATCH 3/6] Update cve-annotate.yaml --- .github/workflows/cve-annotate.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cve-annotate.yaml b/.github/workflows/cve-annotate.yaml index d29ea24563..bb66805d9f 100644 --- a/.github/workflows/cve-annotate.yaml +++ b/.github/workflows/cve-annotate.yaml @@ -15,9 +15,9 @@ jobs: persist-credentials: false fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - + - uses: actions/setup-go@v2 - with: + with: go-version: 1.17 - name: Generate CVE Annotations From cde816535ae6d9b4acab9470008663762ae9912c Mon Sep 17 00:00:00 2001 From: sandeep Date: Fri, 10 Sep 2021 17:50:25 +0530 Subject: [PATCH 4/6] misc update --- .github/workflows/{cve-annotate.yaml => cve-annotate.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{cve-annotate.yaml => cve-annotate.yml} (100%) diff --git a/.github/workflows/cve-annotate.yaml b/.github/workflows/cve-annotate.yml similarity index 100% rename from .github/workflows/cve-annotate.yaml rename to .github/workflows/cve-annotate.yml From 63eabba7583529c769af4a711c4350c1d6aac832 Mon Sep 17 00:00:00 2001 From: sandeep Date: Fri, 10 Sep 2021 22:51:07 +0530 Subject: [PATCH 5/6] Update cve-annotate.yml --- .github/workflows/cve-annotate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cve-annotate.yml b/.github/workflows/cve-annotate.yml index bb66805d9f..754b772885 100644 --- a/.github/workflows/cve-annotate.yml +++ b/.github/workflows/cve-annotate.yml @@ -25,7 +25,7 @@ jobs: run: | if ! which cve-annotate > /dev/null; then echo -e "Command cve-annotate not found! Installing\c" - go install github.com/projectdiscovery/nuclei/v2/cmd/cve-annotate@dev + go install github.com/projectdiscovery/nuclei/v2/cmd/cve-annotate@master fi cve-annotate -i ./cves/ -d . echo "::set-output name=changes::$(git status -s | wc -l)" From e4c3490a28f1b8674b57557b3ca6481456dddc86 Mon Sep 17 00:00:00 2001 From: sandeep Date: Fri, 10 Sep 2021 22:51:33 +0530 Subject: [PATCH 6/6] Update template-validate.yml --- .github/workflows/template-validate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template-validate.yml b/.github/workflows/template-validate.yml index 95e3f9a597..89bd02fd49 100644 --- a/.github/workflows/template-validate.yml +++ b/.github/workflows/template-validate.yml @@ -23,7 +23,7 @@ jobs: env: GO111MODULE: on run: | - go install github.com/projectdiscovery/nuclei/v2/cmd/nuclei@dev + go install github.com/projectdiscovery/nuclei/v2/cmd/nuclei@master shell: bash - name: Template Validation