Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2413c72
Bump minimist from 1.2.5 to 1.2.6
dependabot[bot] Apr 19, 2022
328f32c
Bump ansi-regex from 3.0.0 to 3.0.1
dependabot[bot] Apr 19, 2022
b24282f
Bump node-fetch from 2.6.1 to 2.6.7
dependabot[bot] Apr 19, 2022
d87520a
Bump glob-parent from 5.1.1 to 5.1.2
dependabot[bot] Apr 19, 2022
05a9c05
Bump pathval from 1.1.0 to 1.1.1
dependabot[bot] Apr 19, 2022
13b71df
Bump ws from 7.4.2 to 7.5.7
dependabot[bot] Apr 19, 2022
c342c85
Merge pull request #6 from jorge-abarca/dependabot/npm_and_yarn/ws-7.5.7
jorge-abarca Apr 19, 2022
a81a496
Merge pull request #5 from jorge-abarca/dependabot/npm_and_yarn/pathv…
jorge-abarca Apr 19, 2022
f110178
Merge pull request #4 from jorge-abarca/dependabot/npm_and_yarn/glob-…
jorge-abarca Apr 19, 2022
bced653
Merge pull request #3 from jorge-abarca/dependabot/npm_and_yarn/node-…
jorge-abarca Apr 19, 2022
062a5f7
Merge pull request #2 from jorge-abarca/dependabot/npm_and_yarn/ansi-…
jorge-abarca Apr 19, 2022
60156c6
Merge pull request #1 from jorge-abarca/dependabot/npm_and_yarn/minim…
jorge-abarca Apr 19, 2022
407fd50
Extended support for other reports
jorge-abarca Apr 19, 2022
ad67c93
Added template support for CLI
jorge-abarca Apr 19, 2022
7e6a82b
Fixed typo in readme
jorge-abarca Apr 19, 2022
c76e4ba
Added Action to build dist
jorge-abarca Apr 19, 2022
bc4390e
dist release 📦 - created via Actions
jorge-abarca Apr 19, 2022
3050742
Create codeql-analysis.yml
jorge-abarca Apr 20, 2022
a961c2b
Updated report template to use a macro
jorge-abarca Apr 30, 2022
c24a6a8
Merge branch 'main' of https://github.com/jorge-abarca/github-securit…
jorge-abarca Apr 30, 2022
a6352f4
Refactored templates, added mocking, fixed missing rules & cwes
jorge-abarca May 1, 2022
c8cf867
dist release 📦 - created via Actions
jorge-abarca May 1, 2022
9689e24
Bump @actions/core from 1.2.6 to 1.9.1
dependabot[bot] Aug 18, 2022
06f372d
Merge pull request #7 from jorge-abarca/dependabot/npm_and_yarn/actio…
jorge-abarca Sep 16, 2022
ce621cb
Added additional logging
jorge-abarca Sep 21, 2022
6ce70ce
Fixed "push is not iterable" error.
jorge-abarca Sep 21, 2022
bfde27c
dist release 📦 - created via Actions
jorge-abarca Sep 21, 2022
b2b786c
Bump decode-uri-component from 0.2.0 to 0.2.2
dependabot[bot] Dec 8, 2022
39720d2
Fixed pagination never-ending loop
jorge-abarca Jan 11, 2023
7698864
dist release 📦 - created via Actions
jorge-abarca Jan 11, 2023
f3d3e34
Fixed puppeteer's newPage hanging in Linux
jorge-abarca Jan 12, 2023
2904b01
dist release 📦 - created via Actions
jorge-abarca Jan 12, 2023
43b2827
Merge pull request #8 from jorge-abarca/dependabot/npm_and_yarn/decod…
jorge-abarca Jan 12, 2023
04c05c4
Updated to run on node16
jorge-abarca Jan 12, 2023
b47d790
Reverted back to node 12.
jorge-abarca Jan 12, 2023
c628847
Bump minimatch and mocha
dependabot[bot] Jan 13, 2023
a5ccf55
Changed action to run using node 16
jorge-abarca Jan 16, 2023
26ca85a
Merge pull request #9 from jorge-abarca/dependabot/npm_and_yarn/minim…
jorge-abarca Jan 16, 2023
ef226dd
dist release 📦 - created via Actions
jorge-abarca Jan 16, 2023
4a25827
Updated checkout to version 3
jorge-abarca Jan 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:
jobs:
test:
runs-on: ubuntu-latest

permissions: read-all

steps:
- name: Checkout Sources
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v1
Expand All @@ -25,5 +26,12 @@ jobs:

- name: Test
env:
GH_TOKEN: ${{ secrets.SECURITY_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm test

- name: Upload results
if: always()
uses: actions/upload-artifact@v2
with:
name: results
path: _tmp
32 changes: 32 additions & 0 deletions .github/workflows/build_dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Distribution

on:
workflow_dispatch:

jobs:
build-action-dist:
runs-on: ubuntu-latest
steps:
- name: Get the current branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: myref
- name: Checkout Sources
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 12

- name: Install Dependencies
run: npm ci && npm i -g @vercel/ncc

- name: Build Executable
run: npm run build && ncc build lib --source-map

- uses: EndBug/add-and-commit@v7
with:
add: 'dist'
message: 'dist release 📦 - created via Actions'

4 changes: 2 additions & 2 deletions .github/workflows/build_executables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- type: windows-x64

runs-on: ubuntu-latest

steps:
- name: Checkout Sources
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v1
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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: '35 6 * * 0'

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

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# 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@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
10 changes: 5 additions & 5 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ on:
jobs:
test:
runs-on: ubuntu-latest

steps:

- name: Checkout Sources
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Invoke Action
uses: ./
with:
token: ${{ secrets.SECURITY_TOKEN }}
sarifReportDir: ./samples/sarif/peter-murray/advanced-security-java
outputDir: .

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/manual_test_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ on:
jobs:
test:
runs-on: ubuntu-latest

steps:

- name: Checkout Sources
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Invoke Action
uses: ./
with:
token: ${{ secrets.TEST_TOKEN }}
sarifReportDir: ./samples/sarif/java/detailed
outputDir: .
repository: octodemo/ghas-reporting

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ saving it in the specified directory.
* `sarifReportDir`: The directory to look for SARIF reports (from the CodeQL analyze action this defaults to `../results`)
* `outputDir`: The output directory for the PDF reports, defaults to `github.workspace`
* `repository`: The repository in `<owner>/<repo_name>` form, defaults to `github.repository`
* `template`: The report template type used to render the report, defaults to `summary`


## Templates

Currently the templates are hard coded into the action. There are extension points built into the action that will allow
a future release to provide customization of these templates, via an ability to specify your own.
Currently there is partial support for templates that are included in the action. Extenders of the action are welcome to author
additional templates by creating HTML templates using [Nunjucks](https://mozilla.github.io/nunjucks/templating.html) inside the `templates` folder.

You can specify a template by using the `template` parameter. Currently the following templates are available:
* `summary`: The classic summary report from previous versions.
* `report`: A more detailed report that includes a list of open alerts broken down by their severity.
* `report_sca`: A report that includes Software Composition Analysis


## Examples
Expand Down Expand Up @@ -67,6 +73,7 @@ Options:
* `-r`, `--repository`: The repository that contains the source code, in `<owner>/<repository_name>` form, e.g. `peter-murray/node-hue-api`
* `-s`, `--sarif-directory`: The directory containing the SARIF report files
* `-o`, `--output-directory`: The directory to output the PDF report to. This will be created if it does not exist.
* `--template`: The report template type used to render the report. This defaults to `summary`.

An example of running the MacOS command line executable from the un:
```
Expand All @@ -76,6 +83,6 @@ The above command would output a `summary.pdf` file in the current working direc

## Future improvements

* Add support for selecting reporting templates to the parameters
* Additional work on the currently available reports
* Example of extending html templates and using them

9 changes: 7 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ inputs:
description: Repository name with owner. For example, peter-murray/github-security-report
required: true
default: ${{ github.repository }}

template:
description: Select the report template type you want to use. For example, `summary` or `report`.
required: false
default: summary

runs:
using: node12
using: node16
main: dist/index.js

branding:
icon: shield
color: green
color: green
Empty file modified dist/fsevents.node
100755 → 100644
Empty file.
Loading