Skip to content

Commit a00d154

Browse files
committed
feat: Add Trivy
1 parent df61544 commit a00d154

File tree

5 files changed

+199
-55
lines changed

5 files changed

+199
-55
lines changed

.github/workflows/trivy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Run Trivy vulnerability scanner
1818
uses: aquasecurity/trivy-action@master
1919
with:
20-
image-ref: '$IMAGE_NAME'
20+
image-ref: ${{ env.IMAGE_NAME }}
2121
format: 'table'
2222
exit-code: '1'
2323
ignore-unfixed: true

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 githubuniverse-demo
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,17 @@ jobs:
180180
```
181181
<br>
182182
183+
## Licence
184+
185+
The scripts and documentation in this project are released under the [MIT License](./LICENSE)
186+
## Contributions
187+
188+
Contributions are welcome! See [Contributor's Guide](./docs/contributors.md)
189+
190+
## Code of Conduct
191+
192+
👋 Be nice. See our [code of conduct](./docs/code_of_conduct.md)
193+
183194
## References
184195
185196
+ **Snyk:** https://github.com/snyk/actions
@@ -188,4 +199,5 @@ jobs:
188199
+ **Dockerlint:** https://github.com/marketplace/actions/dockerfile-validator
189200
+ **Sbom:** https://github.com/anchore/sbom-action
190201
+ **PrismaCloud:** https://github.com/PaloAltoNetworks/prisma-cloud-scan
191-
+ **Trufflehog:** https://github.com/marketplace/actions/trufflehog-oss
202+
+ **Trufflehog:** https://github.com/marketplace/actions/trufflehog-oss
203+
+ **Trivy:** https://github.com/aquasecurity/trivy-action

docs/CODE_OF_CONDUCT.md

Lines changed: 49 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,75 @@
22

33
## Our Pledge
44

5-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6-
7-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
811

912
## Our Standards
1013

11-
Examples of behavior that contributes to a positive environment for our community include:
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
1216

13-
* Demonstrating empathy and kindness toward other people
14-
* Being respectful of differing opinions, viewpoints, and experiences
15-
* Giving and gracefully accepting constructive feedback
16-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17-
* Focusing on what is best not just for us as individuals, but for the overall community
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
1822

19-
Examples of unacceptable behavior include:
23+
Examples of unacceptable behavior by participants include:
2024

21-
* The use of sexualized language or imagery, and sexual attention or advances of any kind
22-
* Trolling, insulting or derogatory comments, and personal or political attacks
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
2328
* Public or private harassment
24-
* Publishing others' private information, such as a physical or email address, without their explicit permission
25-
* Contacting individual members, contributors, or leaders privately, outside designated community mechanisms, without their explicit permission
26-
* Other conduct which could reasonably be considered inappropriate in a professional setting
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
2733

28-
## Enforcement Responsibilities
34+
## Our Responsibilities
2935

30-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
3139

32-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
3345

3446
## Scope
3547

36-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
3754

3855
## Enforcement
3956

40-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.
41-
42-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
43-
44-
## Enforcement Guidelines
45-
46-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
47-
48-
### 1. Correction
49-
50-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
51-
52-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
53-
54-
### 2. Warning
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
5563

56-
**Community Impact**: A violation through a single incident or series of actions.
57-
58-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
59-
60-
### 3. Temporary Ban
61-
62-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
63-
64-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
65-
66-
### 4. Permanent Ban
67-
68-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
69-
70-
**Consequence**: A permanent ban from any sort of public interaction within the community.
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
7167

7268
## Attribution
7369

74-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
75-
76-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
7772

7873
[homepage]: https://www.contributor-covenant.org
7974

80-
For answers to common questions about this code of conduct, see the FAQ at <https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

docs/contributors.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Contributors
2+
3+
Thank you for contributing!
4+
5+
We have prepared a short guide so that the process of making your contribution is as simple and clear as possible. Please check it out before you contribute!
6+
7+
## How can I contribute...
8+
9+
* [Contribute Documentation:green_book:](#contribute-documentation)
10+
11+
* [Contribute Code :computer:](#contribute-code)
12+
13+
* [Provide Support on Issues:pencil:](#provide-support-on-issues)
14+
15+
* [Review Pull Requests:mag:](#review-pull-requests)
16+
17+
## Contribute documentation
18+
19+
Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies and how we tell others everything they need to be able to use this project or contribute to it.
20+
21+
Documentation contributions of any size are welcome! Feel free to contribute even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
22+
23+
**How to contribute:**
24+
25+
Pull requests are the easiest way to contribute changes to git repos at GitHub. They are the preferred contribution method, as they offer a convenient way of commenting and amending the proposed changes.
26+
27+
- Please check that no one else has already created a pull request with these or similar changes
28+
- Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request
29+
- Make sure your changes are formatted properly and consistently with the rest of the documentation
30+
- Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything
31+
- If your pull request is connected to an open issue, please, leave a link to this issue in the `Related issue:` section
32+
- If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then push them. The pull request gets automatically updated
33+
34+
**Once you've filed the pull request:**
35+
36+
- Maintainers will review your pull request
37+
- If a maintainer requests changes, first of all, try to think about this request critically and only after that implement and request another review
38+
- If your PR gets accepted, it will soon be merged into the main branch. But your contribution will take effect only after the release of a new version of the action and updating the major tag
39+
> Sometimes maintainers reject pull requests and that's ok! Usually, along with rejection, we supply the reason for it. Nonetheless, we still really appreciate you taking the time to do it, and we don't take that lightly :heart:
40+
41+
## Contribute code
42+
43+
We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
44+
45+
Code contributions of just about any size are acceptable!
46+
47+
The main difference between code contributions and documentation contributions is that contributing code requires the inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added unless the maintainers consider the specific tests to be either impossible or way too much of a burden for such a contribution.
48+
49+
**How to contribute:**
50+
51+
Pull requests are the easiest way to contribute changes to git repos at GitHub. They are the preferred contribution method, as they offer a convenient way of commenting and amending the proposed changes.
52+
53+
- Please check that no one else has already created a pull request with these or similar changes
54+
- Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request
55+
- **Run `pre-checkin` script to format, build and test changes**
56+
- Make sure your changes are well formatted and that all tests are passing
57+
- If your pull request is connected to an open issue, please, leave a link to this issue in the `Related issue:` section
58+
- If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then push them. The pull request gets automatically updated
59+
60+
**Learn more about how to work with the repository:**
61+
62+
- To implement new features or fix bugs, you need to make changes to the `.ts` files, which are located in the `src` folder
63+
- To comply with the code style, **you need to run the `format` script**
64+
- To transpile source code to `javascript` we use [NCC](https://github.com/vercel/ncc). **It is very important to run the `build` script after making changes**, otherwise your changes will not get into the final `javascript` build
65+
- You can also start formatting, building code, and testing with a single `pre-checkin` command
66+
67+
**Learn more about how to implement tests:**
68+
69+
Adding or changing tests is an integral part of making a change to the code.
70+
Unit tests are in the `__tests__` folder, and end-to-end tests are in the `workflows` folder, particularly in the [versions.yml](https://github.com/e-korolevskii/setup-node/blob/update-contributors-guide/.github/workflows/versions.yml) and [e2e-cache.yml](https://github.com/actions/setup-node/blob/main/.github/workflows/e2e-cache.yml) files.
71+
72+
- The contributor can add various types of tests (like unit tests or end-to-end tests), which, in his opinion, will be necessary and sufficient for testing new or changed functionality
73+
- Tests should cover a successful execution, as well as some edge cases and possible errors
74+
- As already mentioned, pull requests without tests will be considered more carefully by maintainers. If you are sure that in this situation the tests are not needed or cannot be implemented with a commensurate effort - please add this clarification message to your pull request
75+
76+
**Once you've filed the pull request:**
77+
78+
- CI will start automatically with some checks. Wait until the end of the execution and make sure that all checks passed successfully. If some checks fail, you can open them one by one, try to find the reason for failing and make changes to your code to resolve the problem
79+
- Maintainers will review your pull request
80+
- If a maintainer requests changes, first of all, try to think about his request critically and only after that implement and request another review
81+
- If your PR gets accepted, it will soon be merged into the main branch. But your contribution will take effect only after the release of a new version of the action and updating the major tag
82+
> Sometimes maintainers reject pull requests and that's ok! Usually, along with rejection, we supply the reason for it. Nonetheless, we still really appreciate you taking the time to do it, and we don't take that lightly :heart:
83+
84+
## Provide support on issues
85+
86+
Helping out other users with their questions is an awesome way of contributing to any community. It's not uncommon for most of the issues on open source projects to be support-related questions by users trying to understand something they ran into or find their way around a known bug.
87+
88+
**To help other folks out with their questions:**
89+
90+
- Go to the [issue tracker](https://github.com/actions/setup-node/issues)
91+
- Read through the list until you find something that you're familiar enough with to answer to
92+
- Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on
93+
- Once the discussion wraps up and things are clarified, ask the original issue filer (or a maintainer) to close it for you
94+
95+
*Some notes on picking up support issues:*
96+
97+
- Avoid responding to issues you don't know you can answer accurately
98+
- Try to refer to past issues with accepted answers as much as possible. Link to them from your replies
99+
- Be kind and patient with users. Often, folks who have run into confusing things might be upset or impatient. This is natural. If you feel uncomfortable in conversation with them, it's better to stay away or withdraw from the issue.
100+
101+
> If some user is violating our code of conduct [standards](https://github.com/actions/setup-node/blob/main/CODE_OF_CONDUCT.md#our-standards), refer to the [Enforcement](https://github.com/actions/setup-node/blob/main/CODE_OF_CONDUCT.md#enforcement) section of the Code of Conduct to resolve the conflict
102+
103+
104+
## Review pull requests
105+
106+
107+
Another great way to contribute is to review pull request. Please, be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) Please, always respond with respect, and be understanding, but don't feel like you need to sacrifice your standards for their sake, either.
108+
109+
**How to review:**
110+
111+
- Go to the [pull requests](https://github.com/actions/setup-node/pulls)
112+
- Make sure you're familiar with the code or documentation is updated, unless it's a minor change (spellchecking, minor formatting, etc.)
113+
- Review changes using the GitHub functionality. You can ask a clarifying question, point out an error or suggest an alternative.
114+
> Note: You may ask for minor changes - "nitpicks", but consider whether they are real blockers to merging or not
115+
- Submit your review, which may include comments, an approval, or a changes request

0 commit comments

Comments
 (0)