You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _articles/security-best-practices-for-your-project.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ To prevent such scenarios, Software Composition Analysis (SCA) tools such as Dep
56
56
57
57
Using open source dependencies can speed up development, but each package includes a license that defines how it can be used, modified, or distributed. Some licenses are permissive, while others (like AGPL or SSPL) impose restrictions that may not be compatible with your project's goals or your users' needs.
58
58
59
-
Imagine this: You add a powerful library to your project, unaware that it uses a restrictive license. Later, a company wants to adopt your project but raises concerns about license compliance. The result? You lose adoption, need to refactor code, and your project’s reputation takes a hit.
59
+
Imagine this: You add a powerful library to your project, unaware that it uses a restrictive license. Later, a company wants to adopt your project but raises concerns about license compliance. The result? You lose adoption, need to refactor code, and your project's reputation takes a hit.
60
60
61
61
To avoid these pitfalls, consider including automated license checks as part of your development workflow. These checks can help identify incompatible licenses early in the process, preventing problematic dependencies from being introduced into your project.
62
62
@@ -86,13 +86,13 @@ On some platforms, you can streamline and strengthen your vulnerability manageme
86
86
87
87
### Define your threat model to help users and researchers understand scope
88
88
89
-
Before security researchers can report issues effectively, they need to understand what risks are in scope. A lightweight threat model can help define your project’s boundaries, expected behavior, and assumptions.
89
+
Before security researchers can report issues effectively, they need to understand what risks are in scope. A lightweight threat model can help define your project's boundaries, expected behavior, and assumptions.
90
90
91
-
A threat model doesn’t need to be complex. Even a simple document outlining what your project does, what it trusts, and how it could be misused goes a long way. It also helps you, as a maintainer, think through potential pitfalls and inherited risks from upstream dependencies.
91
+
A threat model doesn't need to be complex. Even a simple document outlining what your project does, what it trusts, and how it could be misused goes a long way. It also helps you, as a maintainer, think through potential pitfalls and inherited risks from upstream dependencies.
92
92
93
-
A great example is the [Node.js threat model](https://github.com/nodejs/node/security/policy#the-nodejs-threat-model), which clearly defines what is and isn’t considered a vulnerability in the project’s context.
93
+
A great example is the [Node.js threat model](https://github.com/nodejs/node/security/policy#the-nodejs-threat-model), which clearly defines what is and isn't considered a vulnerability in the project's context.
94
94
95
-
If you’re new to this, the [OWASP Threat Modeling Process](https://owasp.org/www-community/Threat_Modeling_Process) offers a helpful introduction to build your own.
95
+
If you're new to this, the [OWASP Threat Modeling Process](https://owasp.org/www-community/Threat_Modeling_Process) offers a helpful introduction to build your own.
96
96
97
97
Publishing a basic threat model alongside your security policy improves clarity for everyone.
98
98
@@ -102,7 +102,7 @@ Publishing a basic threat model alongside your security policy improves clarity
A vulnerability is basically a flaw, a security misconfiguration or a weak point in our system that can be exploited by third parties to behave in unintended ways.
104
104
<pmarkdown="1"class="pquote-credit">
105
-
— [@UlisesGascon](https://github.com/ulisesgascon), ["What is a Vulnerability and What’s Not? Making Sense of Node.js and Express Threat Models"](https://gitnation.com/contents/what-is-a-vulnerability-and-whats-not-making-sense-of-nodejs-and-express-threat-models)
105
+
— [@UlisesGascon](https://github.com/ulisesgascon), ["What is a Vulnerability and What's Not? Making Sense of Node.js and Express Threat Models"](https://gitnation.com/contents/what-is-a-vulnerability-and-whats-not-making-sense-of-nodejs-and-express-threat-models)
106
106
</p>
107
107
</aside>
108
108
@@ -111,18 +111,18 @@ Once you receive a vulnerability report, what happens next?
111
111
Having a basic incident response plan, even a simple checklist, helps you stay calm and act efficiently when time matters. It also shows users and researchers that you take reports seriously.
112
112
113
113
Your process doesn't have to be complex. At minimum, define:
114
-
- Who reviews and triages security reports
115
-
- How you evaluate severity and decide on mitigation
116
-
- What steps you take to prepare a fix and publish a disclosure
117
-
- How you notify affected users or contributors, if needed
114
+
115
+
* Who reviews and triages security reports
116
+
* How you evaluate severity and decide on mitigation
117
+
* What steps you take to prepare a fix and publish a disclosure
118
+
* How you notify affected users or contributors, if needed
118
119
119
120
Coordinated disclosure works best when there's a clear plan. Publishing this (or linking to it) in your `SECURITY.md` file can help set expectations and build trust.
120
121
121
122
For inspiration, the [Express.js Security WG](https://github.com/expressjs/security-wg/blob/main/docs/incident_response_plan.md) provides a simple but effective example of an open source incident response plan.
122
123
123
124
This plan can evolve as your project grows, but having a basic framework in place now can save time and reduce mistakes later.
124
125
125
-
126
126
## Treat security as a team effort
127
127
128
128
### Security isn't a solo responsibility. It works best when shared across your project's community.
@@ -131,19 +131,19 @@ While tools and policies are essential, a strong security posture comes from how
131
131
132
132
Here are a few ways to make security a team sport:
133
133
134
-
-**Assign clear roles**: Know who handles vulnerability reports, who reviews dependency updates, and who approves security patches.
135
-
-**Limit access using the principle of least privilege**: Only give write or admin access to those who truly need it and review permissions regularly.
136
-
-**Invest in education**: Encourage contributors to learn about secure coding practices, common vulnerability types, and how to use your tools (like SAST or secret scanning).
137
-
-**Foster diversity and collaboration**: A heterogeneous team brings a wider set of experiences, threat awareness, and creative problem-solving skills. It also helps uncover risks others might overlook.
138
-
-**Engage upstream and downstream**: Your dependencies can affect your security and your project affects others. Participate in coordinated disclosure with upstream maintainers, and keep downstream users informed when vulnerabilities are fixed.
134
+
***Assign clear roles**: Know who handles vulnerability reports, who reviews dependency updates, and who approves security patches.
135
+
***Limit access using the principle of least privilege**: Only give write or admin access to those who truly need it and review permissions regularly.
136
+
***Invest in education**: Encourage contributors to learn about secure coding practices, common vulnerability types, and how to use your tools (like SAST or secret scanning).
137
+
***Foster diversity and collaboration**: A heterogeneous team brings a wider set of experiences, threat awareness, and creative problem-solving skills. It also helps uncover risks others might overlook.
138
+
***Engage upstream and downstream**: Your dependencies can affect your security and your project affects others. Participate in coordinated disclosure with upstream maintainers, and keep downstream users informed when vulnerabilities are fixed.
139
139
140
140
Security is an ongoing process, not a one-time setup. By involving your community, encouraging secure practices, and supporting each other, you build a stronger, more resilient project and a safer ecosystem for everyone.
141
141
142
142
## Conclusion: A few steps for you, a huge improvement for your users
143
143
144
144
These few steps might seem easy or basic to you, but they go a long way to make your project more secure for its users, because they will provide protection against the most common issues.
145
145
146
-
Security isn’t static. Revisit your processes from time to time as your project grows, so do your responsibilities and your attack surface.
146
+
Security isn't static. Revisit your processes from time to time as your project grows, so do your responsibilities and your attack surface.
0 commit comments