Add Github Action required files and test workflow.
This commit is contained in:
parent
53ad19bb3b
commit
ad8c4aadf3
|
@ -0,0 +1,16 @@
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sarif:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Flawfinder
|
||||||
|
steps:
|
||||||
|
# To use this repository's private action,
|
||||||
|
# you must check out the repository
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Flawfinder action step
|
||||||
|
uses: ./ # Uses an action in the root directory
|
||||||
|
with:
|
||||||
|
command: '--version'
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Container image that runs your code
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
# Copies your code file from your action repository to the filesystem path `/` of the container
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
|
||||||
|
RUN apt update -y
|
||||||
|
|
||||||
|
RUN apt install python3-pip -y
|
||||||
|
|
||||||
|
RUN pip install flawfinder
|
||||||
|
|
||||||
|
# Code file to execute when the docker container starts up (`entrypoint.sh`)
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
@ -0,0 +1,12 @@
|
||||||
|
name: 'Flawfinder'
|
||||||
|
description: 'Execute Flawfinder'
|
||||||
|
inputs:
|
||||||
|
command:
|
||||||
|
description: 'Command to be sent to Flawfinder'
|
||||||
|
required: false
|
||||||
|
default: '--help'
|
||||||
|
runs:
|
||||||
|
using: 'docker'
|
||||||
|
image: 'Dockerfile'
|
||||||
|
args:
|
||||||
|
- ${{ inputs.command }}
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh -l
|
||||||
|
|
||||||
|
flawfinder $1
|
||||||
|
|
||||||
|
echo "Executed with success."
|
Loading…
Reference in New Issue