Skip to content

Commit a071a30

Browse files
authored
Add Security Tests pipeline (#1)
1 parent a57692b commit a071a30

9 files changed

Lines changed: 63 additions & 15 deletions

File tree

.github/pull_request_template.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
Closes #<Issue Number>
1+
Closes #<IssueNumber>
22

33
## Pull request checklist
44

55
Please check if your PR fulfills the following requirements:
6+
67
- [ ] I have read the [CONTRIBUTING](https://github.com/fabasoad/pascal-action/CONTRIBUTING.md) doc.
78
- [ ] Tests for the changes have been added (for bug fixes / features).
89
- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features).
@@ -15,6 +16,7 @@ Please check if your PR fulfills the following requirements:
1516
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->
1617

1718
Please check the type of change your PR introduces:
19+
1820
- [ ] Bugfix
1921
- [ ] Feature
2022
- [ ] Code style update (formatting, renaming)
@@ -23,11 +25,9 @@ Please check the type of change your PR introduces:
2325
- [ ] Documentation content changes
2426
- [ ] Other (please describe):
2527

26-
2728
## What is the current behavior?
2829
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
2930

30-
3131
## What is the new behavior?
3232
<!-- Please describe the behavior or changes that are being added by this PR. -->
3333

@@ -42,7 +42,6 @@ Please check the type of change your PR introduces:
4242

4343
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
4444

45-
4645
## Other information
4746

4847
<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->

.github/workflows/ci-lastest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v2.3.4
1616
with:
1717
ref: ${{ github.ref }}
18-
- uses: fabasoad/pascal-action@v1.0.2
18+
- uses: fabasoad/pascal-action@main
1919
id: pascal
2020
with:
2121
path: ./HelloWorld.pas
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
2-
name: CI (main)
2+
name: Functional tests
33

44
on:
55
push:
66
branches:
77
- main
8-
pull_request:
9-
branches:
10-
- main
8+
- 'bugfix/**'
9+
- 'feature/**'
1110

1211
jobs:
1312
functional_tests:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Security tests
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- 'bugfix/**'
9+
- 'feature/**'
10+
11+
jobs:
12+
security_tests:
13+
name: Dockerfile
14+
timeout-minutes: 10
15+
runs-on: ubuntu-latest
16+
container: snyk/snyk-cli:docker
17+
steps:
18+
- uses: actions/checkout@v2.3.4
19+
with:
20+
ref: ${{ github.ref }}
21+
- name: Test Dockerfile
22+
run: |
23+
docker build -t ${{ github.repository }}:${{ github.sha }} .
24+
snyk auth ${{ secrets.SNYK_API_TOKEN }}
25+
snyk test --docker ${{ github.repository }}:${{ github.sha }} --file=Dockerfile

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.vscode/
1+
.vscode/*
2+
!.vscode/settings.json

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"cSpell.words": [
3+
"HADOLINT",
4+
"appium",
5+
"bewuethr",
6+
"burdzwastaken",
7+
"ibiqlik",
8+
"issuehunt",
9+
"liberapay",
10+
"yamllint"
11+
]
12+
}

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Contributing guidance
2+
23
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
34

45
- Reporting a bug
@@ -8,9 +9,11 @@ We love your input! We want to make contributing to this project as easy and tra
89
- Becoming a maintainer
910

1011
## We Develop with GitHub
12+
1113
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
1214

1315
## We Use [GitHub Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
16+
1417
Pull requests are the best way to propose changes to the codebase (we use [GitHub Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
1518

1619
1. Fork the repo and create your branch from `main`.
@@ -21,20 +24,27 @@ Pull requests are the best way to propose changes to the codebase (we use [GitHu
2124
6. Issue that pull request!
2225

2326
## Any contributions you make will be under the MIT Software License
27+
2428
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
2529

2630
## Report bugs using [GitHub Issues](https://github.com/fabasoad/pascal-action/issues)
31+
2732
We use GitHub issues to track public bugs. Report a bug by opening a new issue. It's that easy!
2833

2934
## Create issue using provided GitHub issue templates
35+
3036
This repository has issue templates for bug report and feature request. Please use them to create an issue and fill all required fields.
3137

3238
## Use a Consistent Coding Style
39+
3340
Please follow all the rules from the following documents:
41+
3442
- [Bash coding style](https://github.com/icy/bash-coding-style) provided by [icy](https://github.com/icy).
3543

3644
## License
45+
3746
By contributing, you agree that your contributions will be licensed under its MIT License.
3847

3948
## References
49+
4050
This document was adapted from the open-source contribution guidelines provided by [briandk](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62).

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Run Pascal script action
2-
![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/fabasoad/pascal-action?include_prereleases) ![CI (latest)](https://github.com/fabasoad/pascal-action/workflows/CI%20(latest)/badge.svg) ![CI (main)](https://github.com/fabasoad/pascal-action/workflows/CI%20(main)/badge.svg) ![YAML Lint](https://github.com/fabasoad/pascal-action/workflows/YAML%20Lint/badge.svg) ![Dockerfile Lint](https://github.com/fabasoad/pascal-action/workflows/Dockerfile%20Lint/badge.svg) ![Shell Lint](https://github.com/fabasoad/pascal-action/workflows/Shell%20Lint/badge.svg)
2+
3+
![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/fabasoad/pascal-action?include_prereleases) ![CI (latest)](https://github.com/fabasoad/pascal-action/workflows/CI%20(latest)/badge.svg) ![Functional tests](https://github.com/fabasoad/pascal-action/workflows/Functional%20tests/badge.svg) ![Security tests](https://github.com/fabasoad/pascal-action/workflows/Security%20tests/badge.svg) ![YAML Lint](https://github.com/fabasoad/pascal-action/workflows/YAML%20Lint/badge.svg) ![Dockerfile Lint](https://github.com/fabasoad/pascal-action/workflows/Dockerfile%20Lint/badge.svg) ![Shell Lint](https://github.com/fabasoad/pascal-action/workflows/Shell%20Lint/badge.svg)
34

45
This action runs Pascal script.
56

67
## Inputs
7-
| Name | Required | Description | Default | Possible values |
8-
|------|----------|-------------------------|---------|-----------------|
9-
| path | Yes | Path to the script file | | &lt;Path&gt; |
8+
9+
| Name | Required | Description | Possible values |
10+
|------|----------|-------------------------|-----------------|
11+
| path | Yes | Path to the script file | _&lt;Path&gt;_ |
1012

1113
## Outputs
14+
1215
| Name | Required | Description |
1316
|--------|----------|---------------------------|
1417
| result | Yes | Result of script running. |

docker-entrypoint.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh -l
2-
# while true; do sleep 30; done;
32
fpc "$1"
43
result=$(${1%.*})
54
echo ::set-output name=result::"$result"

0 commit comments

Comments
 (0)