Skip to content

Commit 63354c3

Browse files
Docs: Update repo templates (microsoft#4677)
1 parent c8f45be commit 63354c3

File tree

5 files changed

+68
-52
lines changed

5 files changed

+68
-52
lines changed

CODE_OF_CONDUCT.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Microsoft Open Source Code of Conduct
2+
3+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4+
5+
Resources:
6+
7+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9+
- Contact [[email protected]](mailto:[email protected]) with questions or concerns
10+
- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support)

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ so we can determine whether the license is compatible and whether any other step
5555
# Code of Conduct
5656

5757
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
58-
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
59-
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
58+
59+
See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for more information.
6060

6161
[label:"good first issue"]:
6262
https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,9 @@ See [CONTRIBUTING.md][] for more information.
512512

513513
# Code Of Conduct
514514

515-
This project has adopted the [Microsoft Open Source Code of Conduct][]. For more information see the
516-
[Code of Conduct FAQ][] or contact [[email protected]][] with any additional questions or comments.
515+
This project has adopted the [Microsoft Open Source Code of Conduct][].
516+
517+
See [CODE_OF_CONDUCT.md][] for more information.
517518

518519
# License
519520

@@ -524,7 +525,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
524525
[Changelog]: https://github.com/microsoft/STL/wiki/Changelog
525526
[clang-format]: https://clang.llvm.org/docs/ClangFormat.html
526527
[CMake]: https://cmake.org/download
527-
[Code of Conduct FAQ]: https://opensource.microsoft.com/codeofconduct/faq/
528+
[CODE_OF_CONDUCT.md]: CODE_OF_CONDUCT.md
528529
[Compiler Explorer]: https://godbolt.org
529530
[CONTRIBUTING.md]: CONTRIBUTING.md
530531
[Developer Community]: https://aka.ms/feedback/report?space=62
@@ -555,6 +556,5 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
555556
[libcxx]: https://libcxx.llvm.org
556557
[lit]: https://llvm.org/docs/CommandGuide/lit.html
557558
[lit result codes]: https://llvm.org/docs/CommandGuide/lit.html#test-status-results
558-
559559
[redistributables]: https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist
560560
[natvis documentation]: https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects

SECURITY.md

+41-46
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,41 @@
1-
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.1 BLOCK -->
2-
3-
## Security
4-
5-
Microsoft takes the security of our software products and services seriously, which includes all source code
6-
repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft),
7-
[Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet),
8-
[Xamarin](https://github.com/xamarin), and [many more](https://opensource.microsoft.com/).
9-
10-
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's
11-
[definition](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security
12-
vulnerability, please report it to us as described below.
13-
14-
## Reporting Security Issues
15-
16-
**Please do not report security vulnerabilities through public GitHub issues.** Instead, please report them to the
17-
Microsoft Security Response Center at [[email protected]](mailto:[email protected]). If possible, encrypt your
18-
message with our PGP key; please download it from the
19-
[Microsoft Security Response Center PGP Key page](https://technet.microsoft.com/en-us/security/dn606155).
20-
21-
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we
22-
received your original message. Additional information can be found at
23-
[microsoft.com/msrc](https://www.microsoft.com/msrc).
24-
25-
Please include the requested information listed below (as much as you can provide) to help us better understand the
26-
nature and scope of the possible issue:
27-
28-
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
29-
* Full paths of source file(s) related to the manifestation of the issue
30-
* The location of the affected source code (tag/branch/commit or direct URL)
31-
* Any special configuration required to reproduce the issue
32-
* Step-by-step instructions to reproduce the issue
33-
* Proof-of-concept or exploit code (if possible)
34-
* Impact of the issue, including how an attacker might exploit the issue
35-
36-
This information will help us triage your report more quickly.
37-
38-
## Preferred Languages
39-
40-
We prefer all communications to be in English.
41-
42-
## Policy
43-
44-
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
45-
46-
<!-- END MICROSOFT SECURITY.MD BLOCK -->
1+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->
2+
3+
## Security
4+
5+
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
6+
7+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
8+
9+
## Reporting Security Issues
10+
11+
**Please do not report security vulnerabilities through public GitHub issues.**
12+
13+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
14+
15+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
16+
17+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18+
19+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20+
21+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22+
* Full paths of source file(s) related to the manifestation of the issue
23+
* The location of the affected source code (tag/branch/commit or direct URL)
24+
* Any special configuration required to reproduce the issue
25+
* Step-by-step instructions to reproduce the issue
26+
* Proof-of-concept or exploit code (if possible)
27+
* Impact of the issue, including how an attacker might exploit the issue
28+
29+
This information will help us triage your report more quickly.
30+
31+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
32+
33+
## Preferred Languages
34+
35+
We prefer all communications to be in English.
36+
37+
## Policy
38+
39+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
40+
41+
<!-- END MICROSOFT SECURITY.MD BLOCK -->

tools/validate/validate.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ int main() {
212212
L".obj"sv,
213213
};
214214

215+
// CODE_OF_CONDUCT.md and SECURITY.md are copied exactly from https://github.com/microsoft/repo-templates
216+
static constexpr array skipped_relative_paths{
217+
LR"(.\CODE_OF_CONDUCT.md)"sv,
218+
LR"(.\SECURITY.md)"sv,
219+
};
220+
215221
// make sure someone doesn't accidentally include a diff in the tree
216222
static constexpr array bad_extensions{
217223
L".diff"sv,
@@ -228,6 +234,7 @@ int main() {
228234

229235
static_assert(ranges::is_sorted(skipped_directories));
230236
static_assert(ranges::is_sorted(skipped_extensions));
237+
static_assert(ranges::is_sorted(skipped_relative_paths));
231238
static_assert(ranges::is_sorted(bad_extensions));
232239
static_assert(ranges::is_sorted(tabby_filenames));
233240
static_assert(ranges::is_sorted(tabby_extensions));
@@ -252,6 +259,10 @@ int main() {
252259

253260
const wstring& relative_path = filepath.native();
254261

262+
if (ranges::binary_search(skipped_relative_paths, relative_path)) {
263+
continue;
264+
}
265+
255266
constexpr size_t maximum_relative_path_length = 120;
256267
if (relative_path.size() > maximum_relative_path_length) {
257268
validation_failure(any_errors, filepath, "filepath is too long ({} characters; the limit is {}).",

0 commit comments

Comments
 (0)