Skip to content

Commit 5060f3d

Browse files
authored
Refactor links (#1205)
* check-links Signed-off-by: chipzoller <chipzoller@gmail.com> * new link hook Signed-off-by: chipzoller <chipzoller@gmail.com> * rename Signed-off-by: chipzoller <chipzoller@gmail.com> * start link refactoring Signed-off-by: chipzoller <chipzoller@gmail.com> * links Signed-off-by: chipzoller <chipzoller@gmail.com> * cli links Signed-off-by: chipzoller <chipzoller@gmail.com> * monitoring Signed-off-by: chipzoller <chipzoller@gmail.com> * tracing Signed-off-by: chipzoller <chipzoller@gmail.com> * fix yes link Signed-off-by: chipzoller <chipzoller@gmail.com> * check rendered links after unrendered links Signed-off-by: chipzoller <chipzoller@gmail.com> * 120 Netlify timeout Signed-off-by: chipzoller <chipzoller@gmail.com> * bump SLSA spec in links Signed-off-by: chipzoller <chipzoller@gmail.com> * deactivate for now Signed-off-by: chipzoller <chipzoller@gmail.com> * include nirmata.com Signed-off-by: chipzoller <chipzoller@gmail.com> * links Signed-off-by: chipzoller <chipzoller@gmail.com> * nits Signed-off-by: chipzoller <chipzoller@gmail.com> * nits Signed-off-by: chipzoller <chipzoller@gmail.com> * nits Signed-off-by: chipzoller <chipzoller@gmail.com> * links Signed-off-by: chipzoller <chipzoller@gmail.com> * fix Signed-off-by: chipzoller <chipzoller@gmail.com> * optimize Signed-off-by: chipzoller <chipzoller@gmail.com> * note about building links Signed-off-by: chipzoller <chipzoller@gmail.com> * note expand Signed-off-by: chipzoller <chipzoller@gmail.com> * links Signed-off-by: chipzoller <chipzoller@gmail.com> * fix Signed-off-by: chipzoller <chipzoller@gmail.com> --------- Signed-off-by: chipzoller <chipzoller@gmail.com> Signed-off-by: Chip Zoller <chipzoller@gmail.com>
1 parent d8d0738 commit 5060f3d

File tree

135 files changed

+497
-406
lines changed

Some content is hidden

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

135 files changed

+497
-406
lines changed

.github/workflows/check-links.yaml

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,50 @@ jobs:
1111
linkChecker:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Waiting for Netlify Preview
15-
uses: jakepartusch/wait-for-netlify-action@f1e137043864b9ab9034ae3a5adc1c108e3f1a48 # v1.4
16-
id: wait-for-netflify-preview
17-
with:
18-
site_name: kyverno
19-
max_timeout: 120
20-
2114
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
2215

23-
- name: Setup Hugo
24-
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
25-
with:
26-
hugo-version: latest
27-
extended: true
28-
29-
- name: Install site dependencies
30-
run: npm install --save-dev autoprefixer && npm install --save-dev postcss-cli && npm install -D postcss
31-
32-
- name: Build site with Hugo
33-
run: hugo --minify -b ${{ steps.wait-for-netflify-preview.outputs.url }}
34-
35-
- name: Link Checker
36-
id: lychee
16+
- name: Check unrendered links
17+
id: lychee_unrendered
3718
uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # v1.9.3
3819
env:
3920
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
4021
with:
4122
fail: true
4223
debug: false
43-
args: --no-progress --github-token ${{secrets.GITHUB_TOKEN}} -c lychee.toml -E public
24+
args: --no-progress --include-fragments --github-token ${{secrets.GITHUB_TOKEN}} -c lychee.toml -E content/
25+
26+
# Deactivated. The --include-fragments flag is causing failures because rendered links
27+
# have a trailing '#' which is probably a result of the link style change plus the new
28+
# custom link renderer in layouts/_default/_markup_render-link.html.
29+
30+
# - name: Setup Hugo
31+
# uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2.6.0
32+
# with:
33+
# hugo-version: latest
34+
# extended: true
35+
36+
# - name: Waiting for Netlify Preview
37+
# uses: jakepartusch/wait-for-netlify-action@f1e137043864b9ab9034ae3a5adc1c108e3f1a48 # v1.4
38+
# id: wait-for-netflify-preview
39+
# with:
40+
# site_name: kyverno
41+
# max_timeout: 120
42+
43+
# - name: Install site dependencies
44+
# run: npm install --save-dev autoprefixer && npm install --save-dev postcss-cli && npm install -D postcss
45+
46+
# - name: Build site with Hugo
47+
# run: hugo --minify -b ${{ steps.wait-for-netflify-preview.outputs.url }}
48+
49+
# - name: Check rendered links
50+
# id: lychee_rendered
51+
# uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # v1.9.3
52+
# env:
53+
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
54+
# with:
55+
# fail: true
56+
# debug: false
57+
# args: --no-progress --include-fragments --github-token ${{secrets.GITHUB_TOKEN}} -c lychee.toml -E public
4458

4559
# - name: Create Issue From File
4660
# if: steps.lychee.outputs.exit_code != 0

.lycheeignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ http://sodipodi.sourceforge.net*
33
http://purl.org*
44
https://github.com/kyverno/policies/openshift/
55
gcpkms://*
6-
https://nirmata.com/*

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@ Active voice is preferred in most writing examples. Ex., "this ClusterPolicy mut
7171

7272
* We standardize on use of the Oxford comma.
7373

74+
### Links
75+
76+
In order to ensure that broken link detection works optimally as well as providing a way for users to find linked content when viewing the raw Markdown files on GitHub, links should be made using **relative paths to files** and not relative rendered paths. Following this method ensures not only pages can be found but anchor links are still valid.
77+
78+
This is a good link:
79+
80+
```
81+
[some link text](foo.md#my-anchor)
82+
```
83+
84+
This is a bad link:
85+
86+
```
87+
[some link text](/docs/foo/#my-anchor)
88+
```
89+
7490
## Documentation Versioning
7591

7692
The Kyverno website now uses releases to organize documentation by the specified release making it easier for users to find the information that pertains to their version. Releases are defined by branches of kyverno/website and a combination of exposing them in the website configuration and modifying hosting parameters.

config/_default/hugo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ disableKinds = ["taxonomy"]
2121

2222
ignoreFiles = [ "^OWNERS$", "README[-]+[a-z]*\\.md", "^node_modules$"]
2323

24-
timeout = 3000
24+
timeout = "30s"
2525

2626
# Norwegian ("no") is sometimes but not currently used for testing.
2727
# Hindi is disabled because it's currently in development.
@@ -38,7 +38,7 @@ blog = "/:section/:year/:month/:day/:slug/"
3838
[imaging]
3939
resampleFilter = "CatmullRom"
4040
quality = 75
41-
anchor = "smart"
41+
anchor = "Smart"
4242

4343
# First one is picked as the Twitter card image if not set on page.
4444
# images = ["images/project-illustration.png"]

config/_default/markup.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
[goldmark]
33
[goldmark.renderer]
44
unsafe = true
5+
[goldmark.renderHooks]
6+
[goldmark.renderHooks.link]
7+
enableDefault = true
8+
# [goldmark.renderHooks.image]
9+
# enableDefault = true
10+
511
[highlight]
612
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
713
style = "tango"

config/_default/menus/menu.en.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[[main]]
44
name = "About"
55
weight = -103
6-
url = "#td-block-1"
6+
url = "#kyverno-is-a-policy-engine-designed-for-kubernetes"
77

88
[[main]]
99
name = "Documentation"

config/_default/params.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ footer_about_disable = false
9797
enable = true
9898

9999
# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful).
100-
yes = 'Glad to hear it! Please <a href="https://github.com/kyverno/kyverno/issues/new">tell us how we can improve</a>.'
100+
yes = 'Glad to hear it! Please <a href="https://github.com/kyverno/website/issues/new/choose">tell us how we can improve</a>.'
101101
no = 'Sorry to hear that. Please <a href="https://github.com/kyverno/website/issues/new/choose">tell us how we can improve</a>.'
102102

103103
# Adds a reading time to the top of each doc.

content/en/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ linkTitle = "Kyverno"
77
# Kubernetes Native Policy Management { class="text-center" }
88

99
<div class="mt-5 mx-auto">
10-
<a class="btn btn-lg btn-primary mr-3 mb-4" href="#td-block-1">
10+
<a class="btn btn-lg btn-primary mr-3 mb-4" href="#kyverno-is-a-policy-engine-designed-for-kubernetes">
1111
Learn More <i class="fa fa-chalkboard-teacher ml-2"></i>
1212
</a>
13-
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="/docs/introduction/#quick-start">
13+
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="docs/introduction/#quick-start-guides">
1414
Get Started <i class="fa fa-arrow-alt-circle-right ml-2 "></i>
1515
</a>
1616

17-
<a class="btn btn-link text-info" href="#td-block-1" aria-label="Read more"><i class="fa fa-chevron-circle-down" style="font-size: 400%"></i></a>
17+
<a class="btn btn-link text-info" href="#kyverno-is-a-policy-engine-designed-for-kubernetes" aria-label="Read more"><i class="fa fa-chevron-circle-down" style="font-size: 400%"></i></a>
1818

1919
</div>
2020
{{< /blocks/cover >}}
@@ -37,7 +37,7 @@ Kyverno policies can **validate, mutate, generate, and cleanup** Kubernetes reso
3737
The Kyverno CLI can be used to test policies and validate resources as part of a **CI/CD pipeline**.
3838

3939
<div class="mt-5 mx-auto">
40-
<a class="btn btn-lg btn-primary mr-3 mb-4" href="/docs/introduction/">
40+
<a class="btn btn-lg btn-primary mr-3 mb-4" href="docs/introduction/">
4141
Documentation <i class="fa fa-book ml-2"></i>
4242
</a>
4343
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="/policies/">

content/en/blog/general/2023-security-audit/index.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ description: "Presenting the results from the Kyverno security audit"
88
The Kyverno project is pleased to announce the completion of its third-party security audit. The audit was conducted by [Ada Logics](https://adalogics.com) in collaboration with the Kyverno maintainers, the [Open Source Technology Improvement Fund](https://ostif.org) and was funded by the [Cloud Native Computing Foundation](https://www.cncf.io).
99

1010
The audit was a holistic security audit with four goals:
11+
1112
1. Define a formal threat model for Kyverno.
1213
2. Conduct a manual code audit for security vulnerabilities.
13-
3. Assess Kyvernos fuzzing suite against the threat model.
14-
4. Evaluate Kyvernos supply-chain risks against SLSA.
14+
3. Assess Kyverno's fuzzing suite against the threat model.
15+
4. Evaluate Kyverno's supply-chain risks against SLSA.
1516

16-
Ada Logics found 10 security issues during the manual code auditing goal. Four of these had their root cause in the Notary verifier which had not been released prior to the audit. One of the findings was in a third-party dependency to Kyverno and was fixed by the Cosign project maintainers.
17+
Ada Logics found 10 security issues during the manual code auditing goal. Four of these had their root cause in the Notary verifier which had not been released prior to the audit. One of the findings was in a third-party dependency to Kyverno and was fixed by the Cosign project maintainers.
1718

18-
In total, 6 CVE’s were assigned during the audit for the following components:
19+
In total, 6 CVEs were assigned during the audit for the following components:
1920

2021
| CVE ID | Vulnerable Kyverno Component | CVE Severity |
2122
| ------ | ---------------------------- | ------------ |
22-
| CVE-2023-42816 | Notary verifier | Moderate |
23+
| CVE-2023-42816 | Notary verifier | Moderate |
2324
| CVE-2023-42815 | Notary verifier | Low |
2425
| CVE-2023-42813 | Notary verifier | Moderate |
2526
| CVE-2023-42814 | Notary verifier | Low |
@@ -28,13 +29,14 @@ In total, 6 CVE’s were assigned during the audit for the following components:
2829

2930
Users consuming Kyverno from official releases have not been affected by the four CVE’s in the Notary verifier, since the Notary verifier has never been part of a public release, before Ada Logics reported the findings during the security audit. Only users building Kyverno from the main branch would be affected by these, however, building from main is highly discouraged.
3031

31-
During the fuzzing goal of the audit, Ada Logics wrote three new fuzzers and added them to Kyvernos fuzzing suite; Earlier this year, Kyverno completed its dedicated fuzzing security audit during which Ada Logics integrated Kyverno into OSS-Fuzz and built a fuzzing suite focusing on hitting high-coverage entry points. During the current security audit, Ada Logics wrote two fuzzers specifically for policy enforcement that attempt to create admission requests that are able to bypass Kyverno policies. In addition, Ada Logics wrote a fuzzer for a third-party dependency that implements complex data processing routines. The two policy fuzzers did not find any possible policy bypasses; the fuzzer for the third-party dependency found two reliability bugs.
32+
During the fuzzing goal of the audit, Ada Logics wrote three new fuzzers and added them to Kyverno's fuzzing suite; Earlier this year, Kyverno completed its dedicated fuzzing security audit during which Ada Logics integrated Kyverno into OSS-Fuzz and built a fuzzing suite focusing on hitting high-coverage entry points. During the current security audit, Ada Logics wrote two fuzzers specifically for policy enforcement that attempt to create admission requests that are able to bypass Kyverno policies. In addition, Ada Logics wrote a fuzzer for a third-party dependency that implements complex data processing routines. The two policy fuzzers did not find any possible policy bypasses; the fuzzer for the third-party dependency found two reliability bugs.
3233

33-
During the SLSA goal, the auditors found that Kyverno impressively complies with the highest possible SLSA score and thereby ensures tamper-proof artifacts to consumers. Kyverno adopts the [slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) which ensures SLSA level 3 compliance by generating verifiable provenance alongside releases on GitHub actions. Consumers can verify Kyvernos provenance by using the [slsa-verifier](https://github.com/slsa-framework/slsa-verifier).
34+
During the SLSA goal, the auditors found that Kyverno impressively complies with the highest possible SLSA score and thereby ensures tamper-proof artifacts to consumers. Kyverno adopts the [slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) which ensures SLSA level 3 compliance by generating verifiable provenance alongside releases on GitHub actions. Consumers can verify Kyverno's provenance by using the [slsa-verifier](https://github.com/slsa-framework/slsa-verifier).
3435

3536
The Kyverno maintainers have quickly addressed all issues found during the audit, with fixes incorporated in Kyverno v1.10.6 and v1.11.1. By prioritizing security work, the Kyverno team aims to provide a seamless and secure experience for consumers. Kyverno will continue to invest in robust security measures, staying ahead of potential threats and vulnerabilities.
3637

3738
Security researchers interested in contributing to Kyverno can find information about getting started [here](https://github.com/kyverno/kyverno/blob/main/SECURITY.md) or [engage with the Kyverno community](https://kyverno.io/community).
3839

3940
## Links
40-
- [Audit report](https://github.com/kyverno/website/blob/main/content/en/blog/general/2023-security-audit/kyverno-2023-security-audit-report.pdf)
41+
42+
- [Audit report (PDF)](kyverno-2023-security-audit-report.pdf)

content/en/blog/general/CVE-2022-47633/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Prior to the December 14th disclosure, Ben had been in contact with the Kyverno
2828
Checking image signatures is a good starting point but not a complete solution to securing the software supply chain. Additional policies should be used to:
2929

3030
* Require that only trusted registries are used ([sample policy](/policies/best-practices/restrict_image_registries/restrict_image_registries/)).
31-
* Ensure attestations (i.e. signed metadata) are checked for provenance and other image attributes ([docs](/docs/writing-policies/verify-images/#verifying-image-attestations)).
31+
* Ensure attestations (i.e. signed metadata) are checked for provenance and other image attributes ([docs](../../../docs/writing-policies/verify-images/sigstore/_index.md#verifying-image-attestations)).
3232

3333
Requiring trusted registries would prevent this attack, as users cannot use the malicious proxy or other untrusted registries.
3434

0 commit comments

Comments
 (0)