Skip to content

Commit ed78614

Browse files
authored
Merge pull request #5248 from microsoft/joslobo/merge-2.0
Merge 2.0 for April 2023 Update
2 parents 760164d + 165888f commit ed78614

File tree

345 files changed

+12764
-6647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

345 files changed

+12764
-6647
lines changed

.config/CredScanSuppressions.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"tool": "Credential Scanner",
3+
"suppressions": [
4+
{
5+
"file": "\\SPECS\\shadow-utils\\shadow-utils.signatures.json",
6+
"_justification": "This is a false positive, probably because it says the word password and has a hash. It is just a measurement of the pam.d system-password configuration file."
7+
},
8+
{
9+
"file": "\\toolkit\\tools\\imagegen\\configuration\\configuration_test.go",
10+
"_justification": "Dummy secrets used to unit test configuration code."
11+
},
12+
{
13+
"file": "\\toolkit\\tools\\imagegen\\configuration\\testdata\\test_configuration.json",
14+
"_justification": "Dummy secrets used to unit test configuration code."
15+
},
16+
{
17+
"file": "toolkit\\tools\\imagegen\\configuration\\user_test.go",
18+
"_justification": "Dummy secrets used to unit test configuration code."
19+
},
20+
{
21+
"file": "\\toolkit\\docs\\quick_start\\quickstart.md",
22+
"_justification": "Secrets for sample, non-production Mariner images."
23+
},
24+
{
25+
"file": "\\toolkit\\imageconfigs\\read-only-root-efi.json",
26+
"_justification": "Secret for a sample, non-production Mariner image."
27+
}
28+
]
29+
}

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
# Modification to this file require admin approval.
55
/.github/CODEOWNERS @microsoft/cbl-mariner-admins
66

7+
# Modifications to the build pipelines require admin approval.
8+
/pipelines/* @microsoft/cbl-mariner-admins
9+
10+
# Modifications to the CredScan exceptions require admin approval.
11+
/.config/CredScanSuppressions.json @microsoft/cbl-mariner-admins
12+
713
# Modification to what is considered "core packages" require admin approval.
814
/SPECS/core-packages/* @microsoft/cbl-mariner-admins
915

CONTRIBUTING.md

Lines changed: 166 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
# Contributing
1+
# CBL-Mariner's Contribution Guide
2+
3+
## Table of Contents
4+
5+
Please use the [auto-generated table of contents](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes#auto-generated-table-of-contents-for-readme-files) GitHub creates. To reveal it, select the three bar menu icon at the top of the page.
6+
7+
## Contributing License Agreement
28

39
This project welcomes contributions and suggestions. Most contributions require you to
410
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
511
and actually do, grant us the rights to use your contribution. For details, visit
6-
https://cla.microsoft.com.
12+
<https://cla.microsoft.com>.
713

814
When you submit a pull request, a CLA-bot will automatically determine whether you need
915
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
@@ -13,17 +19,17 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
1319
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
1420
or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
1521

16-
# Security Vulnerabilities
22+
## Security Vulnerabilities
1723

1824
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.3 BLOCK -->
1925

20-
## Security
26+
### Security
2127

2228
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), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
2329

2430
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below.
2531

26-
## Reporting Security Issues
32+
### Reporting Security Issues
2733

2834
**Please do not report security vulnerabilities through public GitHub issues.**
2935

@@ -35,24 +41,169 @@ You should receive a response within 24 hours. If for some reason you do not, pl
3541

3642
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:
3743

38-
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
39-
* Full paths of source file(s) related to the manifestation of the issue
40-
* The location of the affected source code (tag/branch/commit or direct URL)
41-
* Any special configuration required to reproduce the issue
42-
* Step-by-step instructions to reproduce the issue
43-
* Proof-of-concept or exploit code (if possible)
44-
* Impact of the issue, including how an attacker might exploit the issue
44+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
45+
* Full paths of source file(s) related to the manifestation of the issue
46+
* The location of the affected source code (tag/branch/commit or direct URL)
47+
* Any special configuration required to reproduce the issue
48+
* Step-by-step instructions to reproduce the issue
49+
* Proof-of-concept or exploit code (if possible)
50+
* Impact of the issue, including how an attacker might exploit the issue
4551

4652
This information will help us triage your report more quickly.
4753

4854
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://microsoft.com/msrc/bounty) page for more details about our active programs.
4955

50-
## Preferred Languages
56+
### Preferred Languages
5157

5258
We prefer all communications to be in English.
5359

54-
## Policy
60+
### Policy
5561

5662
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
5763

58-
<!-- END MICROSOFT SECURITY.MD BLOCK -->
64+
<!-- END MICROSOFT SECURITY.MD BLOCK -->
65+
66+
## Develop for CBL-Mariner
67+
68+
When starting to develop for CBL-Mariner, use the [CBL-MarinerTutorials](https://github.com/microsoft/CBL-MarinerTutorials) repo. This repository guides developers on using CBL-Mariner's tools to customize or add new packages or images. Once you have confirmed your change builds and functions as expected, consider whether it should be added to the core repo, [CBL-Mariner](https://github.com/microsoft/CBL-Mariner). Please see our [quickstart](toolkit/docs/quick_start/quickstart.md) for a tutorial and [building instructions](toolkit/docs/building/building.md) for an in-depth overview of building within CBL-Mariner. Please adhere to the [Pull Request guidelines](pull-request-guidelines) when contributing.
69+
70+
### Packages
71+
72+
CBL-Mariner packages live in either [SPECS](SPECS) or [SPECS-EXTENDED](SPECS-EXTENDED). CBL-Mariner packages that are in the `SPECS` directory have full support and coverage with timely CVE maintenance. Packages in `SPECS-EXTENDED` are for experimentation or proof-of-concept purposes only. `SPECS-EXTENDED` can be used as a staging area for iterating on packages with the possiblity of the package being graduated to `SPECS`.
73+
74+
| Package Support Level | Published | Supported | Comments
75+
|:----------------------|:----------|:--------|:------------
76+
|SPECS-EXTENDED |**Yes** |No | - Package needs a viable upstream source which actively addresses CVEs </br> - Package must not include project specific code
77+
|SPECS |**Yes** |**Yes** | - Package needs a viable upstream source which actively addresses CVEs </br> - Package must not include project specific code </br> - Package needs to offer value for multiple use cases
78+
79+
When looking to graduate a package from `SPECS-EXTENDED` to `SPECS`, file a [GitHub issue](https://github.com/microsoft/CBL-Mariner/issues) highlighting the package's value and ensure that the following steps are completed for associated PRs.
80+
81+
1. Increment the spec's `Release` value
82+
1. Add changelog entries "Package promoted from SPECS-EXTENDED to SPECS" and "License verified"
83+
1. Add a `%check` section to the spec if not already present and confirm it passes
84+
1. Ensure spec is free of references, macros, comments, etc. only applicable to other distros
85+
1. Complete the [PR checklist](#pr-checklist)
86+
1. Pass the GitHub checks
87+
88+
### Toolkit
89+
90+
We welcome tooling improvements. When contributing to the toolkit, please adhere to `golang` formatting as described by the [fmt](https://pkg.go.dev/fmt) package. To format using this package, you can run `make go-tidy-all` in your CBL-Mariner toolkit. For guidance on building with the toolkit, see our [building instructions](toolkit/docs/building/building.md).
91+
92+
### Documentation
93+
94+
We welcome documentation improvements. See [toolkit/docs](toolkit/docs) for the latest documentation.
95+
96+
## Pull Request Guidelines
97+
98+
Please direct pull requests to the desired development branch. Development changes to `2.0` should target `main`. Development changes to `1.0` should target `1.0-dev`.
99+
100+
### Branch structure
101+
102+
An overview of how the branches are structured can be seen below
103+
104+
| Branch / Tag | For PRs | Published | Notes
105+
|:-------------|:--------|:----------|:------------
106+
|main |Yes |No | **Primary development branch**
107+
|2.0 |No |Yes - eventually | Staging branch for publishing
108+
|2.0-stable |No | Yes | Last published release
109+
|2.0-preview |No |No | Publishing in progress
110+
111+
| Branch / Tag | For PRs | Published | Notes
112+
|:-------------|:--------|:----------|:------------
113+
|1.0-dev |Yes |No | Development branch for 1.0
114+
|1.0 |No |Yes - eventually | Staging branch for publishing
115+
|1.0-stable |No |Yes | Last published release
116+
|1.0-preview |No |No | Publishing in progress
117+
118+
### PR Titles
119+
120+
PR titles should start with an action
121+
122+
```bash
123+
- Add <package>
124+
- Bump Release version for October Update
125+
- Change whatever you changed.
126+
- Fix <thing you fixed> <reason you fixed it>
127+
- Patch <package> to fix CVE-XXXX-YYYY, CVE-XXXX-YYYY…
128+
- Upgrade <package> to version vvvv to fix CVE-XXXX-YYYY…
129+
- Remove <package> <reason you removed it>
130+
```
131+
132+
Please avoid titles such as
133+
134+
```bash
135+
- package: <whatever you did to the package>
136+
- CVE-XXXX-YYYY (leaving off what package was patched or upgraded)
137+
- [1.0] (prefixing with branch or other information)
138+
```
139+
140+
### PR Checklist
141+
142+
When creating your PR, please ensure the following:
143+
144+
* The toolchain has been rebuilt successfully (or no changes were made to it). This only applies if you changed any packages in the [toolchain package manifests](toolkit/resources/manifests/package). Specifically, `toolchain_x86_64.txt` and `toolchain_aarch64.txt`. For guidance on building the toolchain, see our [building instructions](toolkit/docs/building/building.md).
145+
146+
* The [toolchain / worker package manifests](toolkit/resources/manifests/package) are up-to-date (versions match latest package versions in SPEC files). The manifests are the following files:
147+
* toolchain_x86_64.txt
148+
* toolchain_aarch64.txt
149+
* pkggen_core_x86_64.txt
150+
* pkggen_core_aarch64.txt
151+
152+
* Any updated packages successfully build (or no packages were changed). For guidance on building packages, see our [building instructions](toolkit/docs/building/building.md). Please ensure the package is located in the [appropriate folder](#packages).
153+
154+
* Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their `Release` tag incremented. Dependent packages are packages which contain a `BuildRequires` on the package you are updating and create static links from your package. This can be difficult to discern based on spec files alone and may require investigating `make` commands in dependent packages or consulting a CBL-Mariner dev.
155+
156+
* Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files. When running the check section, results will not fail a build. Check the logs for the results of this section.
157+
158+
* All package sources are available. The sources are either in the source server or local `SPECS` folder (`SPECS/<package>/SOURCES` or `SPECS/<package>`). While it is possible to build packages with all sources inside the repo, our policy is generally to have the source compressed and placed on the source server. Uploading to the source server can only be accomplished by a CBL-Mariner developer. Please request help in your PR for uploading your sources to the source server. To check the source server see [https://cblmarinerstorage.blob.core.windows.net/sources/core/< source tar >].
159+
160+
* cgmanifest files are up-to-date and alphabetically sorted. The cgmanifest files are used to record all package sources. They include the following files:
161+
162+
* ./cgmanifest.json
163+
* ./toolkit/tools/cgmanifest.json
164+
* ./toolkit/scripts/toolchain/cgmanifest.json,
165+
* .github/workflows/cgmanifest.json
166+
167+
To validate, run the following in a CBL-Mariner container or Ubuntu >= 22.04
168+
169+
```bash
170+
.github/workflows/validate-cg-manifest.sh SPECS/<package name>/<package-name>.spec
171+
```
172+
173+
* LICENSE-MAP files are up-to-date. These files indicate which licenses are being used by CBL-Mariner's packages and where the package may be derived from. The license files include the following files:
174+
* ./SPECS/LICENSES-AND-NOTICES/data/licenses.json
175+
* ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md
176+
177+
This can be checked by running
178+
179+
```bash
180+
python3 ./toolkit/scripts/license_map.py \
181+
./SPECS/LICENSES-AND-NOTICES/data/licenses.json \
182+
./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md \
183+
./SPECS \
184+
./SPECS-EXTENDED \
185+
./SPECS-SIGNED
186+
```
187+
188+
* All source files have up-to-date hashes in the *.signatures.json files. This hash is generated by `sha256sum`. You can also use the make tools to automatically update these hashes.
189+
190+
```bash
191+
cd toolkit
192+
sudo make input-srpms REBUILD_TOOLS=y SRPM_FILE_SIGNATURE_HANDLING=update
193+
```
194+
195+
* If you modified the go tools, ensure that the formatting meets golang's standards and that the tests still pass.
196+
197+
```bash
198+
cd toolkit
199+
# fix formatting
200+
sudo make go-tidy-all
201+
# check tests
202+
sudo make go-test-coverage
203+
```
204+
205+
* Documentation has been updated to match any changes to the build system. See [toolkit/docs](toolkit/docs).
206+
207+
## Bugs
208+
209+
If the bug is security related, please use the [security guidelines](#security-vulnerabilities) above. Otherwise, please use the [issues page](https://github.com/microsoft/CBL-Mariner/issues) on CBL-Mariner to file bugs.

SPECS-EXTENDED/buildah/buildah.spec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Summary: A command line tool used for creating OCI Images
2222
Name: %{repo}
2323
Version: 1.18.0
24-
Release: 10%{?dist}
24+
Release: 12%{?dist}
2525
License: ASL 2.0
2626
Vendor: Microsoft Corporation
2727
Distribution: Mariner
@@ -122,6 +122,12 @@ cp imgtype %{buildroot}/%{_bindir}/%{name}-imgtype
122122
%{_datadir}/%{name}/test
123123

124124
%changelog
125+
* Wed Apr 05 2023 CBL-Mariner Servicing Account <[email protected]> - 1.18.0-12
126+
- Bump release to rebuild with go 1.19.8
127+
128+
* Tue Mar 28 2023 CBL-Mariner Servicing Account <[email protected]> - 1.18.0-11
129+
- Bump release to rebuild with go 1.19.7
130+
125131
* Wed Mar 15 2023 CBL-Mariner Servicing Account <[email protected]> - 1.18.0-10
126132
- Bump release to rebuild with go 1.19.6
127133

SPECS-EXTENDED/containernetworking-plugins/containernetworking-plugins.spec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
Name: %{project}-%{repo}
2626
Version: 1.1.1
27-
Release: 6%{?dist}
27+
Release: 8%{?dist}
2828
Summary: Libraries for writing CNI plugin
2929
License: ASL 2.0 and BSD and MIT
3030
Vendor: Microsoft Corporation
@@ -129,6 +129,12 @@ install -p plugins/ipam/dhcp/systemd/cni-dhcp.socket %{buildroot}%{_unitdir}
129129
%{_unitdir}/cni-dhcp.socket
130130

131131
%changelog
132+
* Wed Apr 05 2023 CBL-Mariner Servicing Account <[email protected]> - 1.1.1-8
133+
- Bump release to rebuild with go 1.19.8
134+
135+
* Tue Mar 28 2023 CBL-Mariner Servicing Account <[email protected]> - 1.1.1-7
136+
- Bump release to rebuild with go 1.19.7
137+
132138
* Wed Mar 15 2023 CBL-Mariner Servicing Account <[email protected]> - 1.1.1-6
133139
- Bump release to rebuild with go 1.19.6
134140

SPECS-EXTENDED/delve/delve.spec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Vendor: Microsoft Corporation
22
Distribution: Mariner
33
Name: delve
44
Version: 1.5.0
5-
Release: 9%{?dist}
5+
Release: 11%{?dist}
66
Summary: A debugger for the Go programming language
77

88
License: MIT
@@ -72,6 +72,12 @@ done
7272

7373

7474
%changelog
75+
* Wed Apr 05 2023 CBL-Mariner Servicing Account <[email protected]> - 1.5.0-11
76+
- Bump release to rebuild with go 1.19.8
77+
78+
* Tue Mar 28 2023 CBL-Mariner Servicing Account <[email protected]> - 1.5.0-10
79+
- Bump release to rebuild with go 1.19.7
80+
7581
* Wed Mar 15 2023 CBL-Mariner Servicing Account <[email protected]> - 1.5.0-9
7682
- Bump release to rebuild with go 1.19.6
7783

SPECS-EXTENDED/libgxps/libgxps.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Vendor: Microsoft Corporation
22
Distribution: Mariner
33
Name: libgxps
44
Version: 0.3.1
5-
Release: 7%{?dist}
5+
Release: 8%{?dist}
66
Summary: GObject based library for handling and rendering XPS documents
77

88
License: LGPLv2+
@@ -77,6 +77,9 @@ documents using the %{name} library.
7777

7878

7979
%changelog
80+
* Fri Mar 31 2023 Pawel Winogrodzki <[email protected]> - 0.3.1-8
81+
- Bumping release to re-build with newer 'libtiff' libraries.
82+
8083
* Mon Mar 21 2022 Pawel Winogrodzki <[email protected]> - 0.3.1-7
8184
- Adding BR on '%%{_bindir}/xsltproc'.
8285
- Disabled gtk doc generation to remove network dependency during build-time.

SPECS-EXTENDED/netpbm/netpbm.spec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: A library for handling different graphics file formats
22
Name: netpbm
33
Version: 10.90.00
4-
Release: 4%{?dist}
4+
Release: 5%{?dist}
55
# See copyright_summary for details
66
License: BSD and GPLv2 and IJG and MIT and Public Domain
77
Vendor: Microsoft Corporation
@@ -224,6 +224,9 @@ popd
224224
%doc userguide/*
225225

226226
%changelog
227+
* Fri Mar 31 2023 Pawel Winogrodzki <[email protected]> - 10.90.00-5
228+
- Bumping release to re-build with newer 'libtiff' libraries.
229+
227230
* Fri Apr 15 2022 Pawel Winogrodzki <[email protected]> - 10.90.00-4
228231
- Updating source URL.
229232

@@ -1317,4 +1320,3 @@ popd
13171320

13181321
* Thu Jul 10 1997 Erik Troan <[email protected]>
13191322
- built against glibc
1320-

SPECS-EXTENDED/openjpeg2/openjpeg2.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Distribution: Mariner
1010

1111
Name: openjpeg2
1212
Version: 2.3.1
13-
Release: 11%{?dist}
13+
Release: 12%{?dist}
1414
Summary: C-Library for JPEG 2000
1515

1616
# windirent.h is MIT, the rest is BSD
@@ -353,6 +353,10 @@ chmod +x %{buildroot}%{_bindir}/opj2_jpip_viewer
353353

354354

355355
%changelog
356+
* Fri Mar 31 2023 Pawel Winogrodzki <[email protected]> - 2.3.1-12
357+
- Bumping release to re-build with newer 'libtiff' libraries.
358+
- License verified.
359+
356360
* Fri Oct 15 2021 Pawel Winogrodzki <[email protected]> - 2.3.1-11
357361
- Initial CBL-Mariner import from Fedora 33 (license: MIT).
358362

0 commit comments

Comments
 (0)