@eeacms/volto-eea-versions 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +6 -6
- package/.github/workflows/betterleaks.yml +133 -0
- package/.gitleaks.toml +89 -0
- package/CHANGELOG.md +28 -1
- package/README.md +59 -0
- package/RELEASE.md +1 -1
- package/package.json +1 -1
- package/src/Blocks/AllVersions.jsx +1 -1
- package/src/Blocks/LatestVersion.jsx +1 -1
- package/src/Blocks/index.js +2 -0
- package/src/Blocks/withEEAVersions.jsx +2 -2
package/.eslintrc.js
CHANGED
|
@@ -16,16 +16,16 @@ if (configFile) {
|
|
|
16
16
|
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
const
|
|
19
|
+
const { AddonRegistry } = require('@plone/registry/addon-registry');
|
|
20
|
+
const { registry } = AddonRegistry.init(projectRootPath);
|
|
21
21
|
|
|
22
22
|
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
23
|
-
const addonAliases = Object.keys(
|
|
23
|
+
const addonAliases = Object.keys(registry.packages).map((o) => [
|
|
24
24
|
o,
|
|
25
|
-
|
|
25
|
+
registry.packages[o].modulePath,
|
|
26
26
|
]);
|
|
27
27
|
|
|
28
|
-
const addonExtenders =
|
|
28
|
+
const addonExtenders = registry.getEslintExtenders().map((m) => require(m));
|
|
29
29
|
|
|
30
30
|
const defaultConfig = {
|
|
31
31
|
extends: `${voltoPath}/.eslintrc`,
|
|
@@ -34,7 +34,7 @@ const defaultConfig = {
|
|
|
34
34
|
alias: {
|
|
35
35
|
map: [
|
|
36
36
|
['@plone/volto', '@plone/volto/src'],
|
|
37
|
-
['@plone/volto-slate', '@plone/volto
|
|
37
|
+
['@plone/volto-slate', '@plone/volto-slate/src'],
|
|
38
38
|
...addonAliases,
|
|
39
39
|
['@package', `${__dirname}/src`],
|
|
40
40
|
['@root', `${__dirname}/src`],
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
name: Betterleaks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
scan:
|
|
12
|
+
name: Scan for secrets
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
env:
|
|
15
|
+
SMTP_URL: ${{ secrets.SMTP_URL }}
|
|
16
|
+
SMTP_PORT: ${{ secrets.SMTP_PORT || '25' }}
|
|
17
|
+
SMTP_EMAIL: ${{ secrets.SMTP_EMAIL }}
|
|
18
|
+
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 1
|
|
24
|
+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
25
|
+
|
|
26
|
+
- name: Run Betterleaks
|
|
27
|
+
id: betterleaks
|
|
28
|
+
continue-on-error: true
|
|
29
|
+
uses: dortort/betterleaks-action@v0.1.0
|
|
30
|
+
with:
|
|
31
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
32
|
+
scan-mode: dir
|
|
33
|
+
scan-path: .
|
|
34
|
+
config: .gitleaks.toml
|
|
35
|
+
report-format: json
|
|
36
|
+
report-path: betterleaks-report.json
|
|
37
|
+
redact: "true"
|
|
38
|
+
no-color: "true"
|
|
39
|
+
no-banner: "true"
|
|
40
|
+
fail-on-leak: "true"
|
|
41
|
+
|
|
42
|
+
- name: Upload Betterleaks report
|
|
43
|
+
if: always()
|
|
44
|
+
uses: actions/upload-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: betterleaks-report
|
|
47
|
+
path: betterleaks-report.json
|
|
48
|
+
if-no-files-found: ignore
|
|
49
|
+
|
|
50
|
+
- name: Build Betterleaks email summary
|
|
51
|
+
id: leak_summary
|
|
52
|
+
if: steps.betterleaks.outcome == 'failure'
|
|
53
|
+
shell: bash
|
|
54
|
+
run: |
|
|
55
|
+
if [[ -s betterleaks-report.json ]]; then
|
|
56
|
+
jq -r '
|
|
57
|
+
def one_line:
|
|
58
|
+
tostring
|
|
59
|
+
| gsub("[\r\n]+"; " ")
|
|
60
|
+
| if length > 240 then .[0:240] + "..." else . end;
|
|
61
|
+
|
|
62
|
+
.[:20][]
|
|
63
|
+
| "- " + (.RuleID // "unknown-rule")
|
|
64
|
+
+ " at " + (.File // "unknown-file")
|
|
65
|
+
+ ":" + ((.StartLine // 0) | tostring)
|
|
66
|
+
+ "\n match: " + ((.Match // .Secret // "REDACTED") | one_line)
|
|
67
|
+
' betterleaks-report.json > betterleaks-email-summary.txt
|
|
68
|
+
|
|
69
|
+
count="$(jq 'length' betterleaks-report.json)"
|
|
70
|
+
if (( count > 20 )); then
|
|
71
|
+
{
|
|
72
|
+
echo ""
|
|
73
|
+
echo "... and $((count - 20)) more finding(s). Download the artifact for full details."
|
|
74
|
+
} >> betterleaks-email-summary.txt
|
|
75
|
+
fi
|
|
76
|
+
else
|
|
77
|
+
echo "No JSON report was generated. Download the workflow logs for details." > betterleaks-email-summary.txt
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
{
|
|
81
|
+
echo "text<<BETTERLEAKS_SUMMARY"
|
|
82
|
+
cat betterleaks-email-summary.txt
|
|
83
|
+
echo "BETTERLEAKS_SUMMARY"
|
|
84
|
+
} >> "$GITHUB_OUTPUT"
|
|
85
|
+
|
|
86
|
+
- name: Resolve committer email
|
|
87
|
+
id: committer
|
|
88
|
+
if: steps.betterleaks.outcome == 'failure'
|
|
89
|
+
shell: bash
|
|
90
|
+
run: |
|
|
91
|
+
committer_email="$(git log -1 --format='%ce')"
|
|
92
|
+
author_email="$(git log -1 --format='%ae')"
|
|
93
|
+
email="$committer_email"
|
|
94
|
+
if [[ -z "$email" || "$email" == *"noreply.github.com"* ]]; then
|
|
95
|
+
email="$author_email"
|
|
96
|
+
fi
|
|
97
|
+
if [[ "$email" =~ ^[^[:space:]@]+@[^[:space:]@]+\.[^[:space:]@]+$ && "$email" != *"noreply.github.com"* ]]; then
|
|
98
|
+
echo "email=$email" >> "$GITHUB_OUTPUT"
|
|
99
|
+
else
|
|
100
|
+
echo "No deliverable committer email found; skipping Betterleaks email notification."
|
|
101
|
+
echo "email=" >> "$GITHUB_OUTPUT"
|
|
102
|
+
fi
|
|
103
|
+
|
|
104
|
+
- name: Email committer on Betterleaks failure
|
|
105
|
+
if: steps.betterleaks.outcome == 'failure' && steps.committer.outputs.email != '' && env.SMTP_URL != '' && env.SMTP_EMAIL != ''
|
|
106
|
+
uses: dawidd6/action-send-mail@v18
|
|
107
|
+
with:
|
|
108
|
+
server_address: ${{ env.SMTP_URL }}
|
|
109
|
+
server_port: ${{ env.SMTP_PORT }}
|
|
110
|
+
secure: ${{ env.SMTP_PORT == '465' }}
|
|
111
|
+
username: ${{ env.SMTP_EMAIL }}
|
|
112
|
+
password: ${{ env.SMTP_PASSWORD }}
|
|
113
|
+
from: ${{ env.SMTP_EMAIL }}
|
|
114
|
+
to: ${{ steps.committer.outputs.email }}
|
|
115
|
+
subject: "[Betterleaks] Secret scan failed in ${{ github.repository }}"
|
|
116
|
+
body: |
|
|
117
|
+
Betterleaks detected one or more potential secrets.
|
|
118
|
+
|
|
119
|
+
Repository: ${{ github.repository }}
|
|
120
|
+
Branch: ${{ github.ref_name }}
|
|
121
|
+
Commit: ${{ github.sha }}
|
|
122
|
+
Workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
123
|
+
|
|
124
|
+
Findings:
|
|
125
|
+
${{ steps.leak_summary.outputs.text }}
|
|
126
|
+
|
|
127
|
+
Download the betterleaks-report artifact from the workflow run for details.
|
|
128
|
+
|
|
129
|
+
- name: Fail if Betterleaks found leaks
|
|
130
|
+
if: steps.betterleaks.outcome == 'failure'
|
|
131
|
+
run: |
|
|
132
|
+
echo "Betterleaks detected one or more secrets. Download the betterleaks-report artifact from this workflow run for details."
|
|
133
|
+
exit 1
|
package/.gitleaks.toml
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
title = "Betterleaks config"
|
|
2
|
+
|
|
3
|
+
[extend]
|
|
4
|
+
useDefault = true
|
|
5
|
+
|
|
6
|
+
[[rules]]
|
|
7
|
+
id = "secret-literal-assignment"
|
|
8
|
+
description = "Secret-like literal assignment in source, YAML, env and config files"
|
|
9
|
+
regex = '''(?i)([A-Za-z0-9_.-]*(?:password|passwd|pwd|api[_-]?key|apikey|access[_-]?key|secret[_-]?access[_-]?key|private[_-]?key|client[_-]?secret|consumer[_-]?key|consumer[_-]?secret|(?:auth|access|refresh|session|api|bearer|id|jwt|csrf|xsrf|oauth)[_-]?token|translate[_-]?auth|translation[_-]?auth|auth[_-]?password|auth[_-]?key|auth[_-]?credentials|database[_-]?url|connection[_-]?string)[A-Za-z0-9_.-]*)[ \t]*[:=][ \t]*["'']?([^"''[:space:]#{}$.][^"''\n#{}]{2,})["'']?'''
|
|
10
|
+
secretGroup = 2
|
|
11
|
+
keywords = [
|
|
12
|
+
"password",
|
|
13
|
+
"passwd",
|
|
14
|
+
"pwd",
|
|
15
|
+
"api_key",
|
|
16
|
+
"apikey",
|
|
17
|
+
"access_key",
|
|
18
|
+
"private_key",
|
|
19
|
+
"client_secret",
|
|
20
|
+
"consumer_key",
|
|
21
|
+
"consumer_secret",
|
|
22
|
+
"auth_token",
|
|
23
|
+
"access_token",
|
|
24
|
+
"refresh_token",
|
|
25
|
+
"session_token",
|
|
26
|
+
"api_token",
|
|
27
|
+
"bearer_token",
|
|
28
|
+
"id_token",
|
|
29
|
+
"jwt_token",
|
|
30
|
+
"csrf_token",
|
|
31
|
+
"xsrf_token",
|
|
32
|
+
"oauth_token",
|
|
33
|
+
"translate_auth",
|
|
34
|
+
"translation_auth",
|
|
35
|
+
"auth_password",
|
|
36
|
+
"auth_key",
|
|
37
|
+
"auth_credentials",
|
|
38
|
+
"database_url",
|
|
39
|
+
"connection_string"
|
|
40
|
+
]
|
|
41
|
+
tags = ["literal-secret"]
|
|
42
|
+
|
|
43
|
+
[[rules]]
|
|
44
|
+
id = "env-short-secret-assignment"
|
|
45
|
+
description = "Uppercase env-style PASS/TOKEN/SECRET assignment"
|
|
46
|
+
regex = '''\b((?:PASS|TOKEN|SECRET|[A-Z0-9_]*(?:_PASS|_TOKEN|_SECRET|PASS_|TOKEN_|SECRET_)[A-Z0-9_]*))[ \t]*[:=][ \t]*["'']?([^"''[:space:]#{}$.][^"''\n#{}]{2,})["'']?'''
|
|
47
|
+
secretGroup = 2
|
|
48
|
+
keywords = [
|
|
49
|
+
"PASS",
|
|
50
|
+
"TOKEN",
|
|
51
|
+
"SECRET"
|
|
52
|
+
]
|
|
53
|
+
tags = ["env", "literal-secret"]
|
|
54
|
+
|
|
55
|
+
[[rules]]
|
|
56
|
+
id = "standalone-sk-token"
|
|
57
|
+
description = "Standalone sk-* token not attached to a secret-like variable name"
|
|
58
|
+
regex = '''(?i)\b(sk-[A-Za-z0-9][A-Za-z0-9_-]{20,})\b'''
|
|
59
|
+
secretGroup = 1
|
|
60
|
+
entropy = 2.5
|
|
61
|
+
keywords = ["sk-"]
|
|
62
|
+
tags = ["standalone-token", "generic"]
|
|
63
|
+
|
|
64
|
+
[[rules]]
|
|
65
|
+
id = "dotenv-only-jest-setup"
|
|
66
|
+
description = ".env may only contain the committed Jest setup lines"
|
|
67
|
+
path = '''(?i)(^|/)\.env$'''
|
|
68
|
+
regex = '''(?m)^(.+)$'''
|
|
69
|
+
secretGroup = 1
|
|
70
|
+
tags = ["file", "dotenv"]
|
|
71
|
+
[[rules.allowlists]]
|
|
72
|
+
regexTarget = "match"
|
|
73
|
+
regexes = [
|
|
74
|
+
'''^JEST_USE_SETUP=OFF # Jest configuration variables: ON, OFF\r?$''',
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
[[rules]]
|
|
78
|
+
id = "forbidden-secret-file"
|
|
79
|
+
description = "Forbidden secret-bearing file committed to repository"
|
|
80
|
+
path = '''(?i)(^|/)(\.env\..*|\.npmrc|\.pypirc|id_rsa|id_ed25519|.*\.(pem|key|p12|pfx|jks|kubeconfig))$'''
|
|
81
|
+
regex = '''(?s).{1,}'''
|
|
82
|
+
tags = ["file", "secret-file"]
|
|
83
|
+
|
|
84
|
+
[[allowlists]]
|
|
85
|
+
description = "Allow Jenkins SonarQube token environment variable reference"
|
|
86
|
+
regexTarget = "match"
|
|
87
|
+
regexes = [
|
|
88
|
+
'''SONAR_AUTH_TOKEN''',
|
|
89
|
+
]
|
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,27 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [2.0.
|
|
7
|
+
### [2.0.2](https://github.com/eea/volto-eea-versions/compare/2.0.1...2.0.2) - 27 July 2026
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: Add edit property to LatestVersion and AllVersions - refs #305522 [dobri1408 - [`238b1c6`](https://github.com/eea/volto-eea-versions/commit/238b1c66804d1a2a64a7ef4841e079856af4c4c2)]
|
|
12
|
+
- fix: Add betterleaks github action - refs #304517 [dobri1408 - [`f9765c4`](https://github.com/eea/volto-eea-versions/commit/f9765c438c6d84bca78a7b0cb80f877f34cdf203)]
|
|
13
|
+
|
|
14
|
+
#### :house: Internal changes
|
|
15
|
+
|
|
16
|
+
- chore: [JENKINSFILE] sanitize sonarqube command Refs #305084 [valentinab25 - [`7be20db`](https://github.com/eea/volto-eea-versions/commit/7be20db95a6ba843e4cd2c7a6f9624ff3330656b)]
|
|
17
|
+
|
|
18
|
+
#### :hammer_and_wrench: Others
|
|
19
|
+
|
|
20
|
+
- test: pin Chromium version 149 to work with Cypress [valentinab25 - [`5c70940`](https://github.com/eea/volto-eea-versions/commit/5c709402c1e036248016f9a30b461d203fb52bc8)]
|
|
21
|
+
### [2.0.1](https://github.com/eea/volto-eea-versions/compare/2.0.0...2.0.1) - 8 April 2026
|
|
22
|
+
|
|
23
|
+
#### :bug: Bug Fixes
|
|
24
|
+
|
|
25
|
+
- fix: make test [Alin V. (Claudiu) - [`82b0c44`](https://github.com/eea/volto-eea-versions/commit/82b0c449ce958c43d7725dab63bdf2c98afb8c52)]
|
|
26
|
+
|
|
27
|
+
## [2.0.0](https://github.com/eea/volto-eea-versions/compare/1.0.1...2.0.0) - 25 March 2026
|
|
8
28
|
|
|
9
29
|
#### :rocket: New Features
|
|
10
30
|
|
|
@@ -12,6 +32,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
12
32
|
|
|
13
33
|
#### :house: Internal changes
|
|
14
34
|
|
|
35
|
+
- chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`2f4a62d`](https://github.com/eea/volto-eea-versions/commit/2f4a62d39d30b2e2bc44d367517121d39252b037)]
|
|
36
|
+
- chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`75259dc`](https://github.com/eea/volto-eea-versions/commit/75259dcd39e2ae84ede23a47b50721654f7fe34f)]
|
|
15
37
|
|
|
16
38
|
#### :hammer_and_wrench: Others
|
|
17
39
|
|
|
@@ -31,6 +53,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
31
53
|
#### :hammer_and_wrench: Others
|
|
32
54
|
|
|
33
55
|
- Release #4 from eea/develop [David Ichim - [`c649076`](https://github.com/eea/volto-eea-versions/commit/c64907618c948834331d98aa219809e3159289f4)]
|
|
56
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`68bb33d`](https://github.com/eea/volto-eea-versions/commit/68bb33d275e5484b022cf0aad5084f8da8f98de3)]
|
|
57
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`0abf06b`](https://github.com/eea/volto-eea-versions/commit/0abf06b6e67152960582e993d79e9c401e04cd1e)]
|
|
58
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`aaedb59`](https://github.com/eea/volto-eea-versions/commit/aaedb59a81591f6db124cf27ae3a074f05444a27)]
|
|
34
59
|
## [1.0.0](https://github.com/eea/volto-eea-versions/compare/0.2.0...1.0.0) - 18 December 2024
|
|
35
60
|
|
|
36
61
|
#### :nail_care: Enhancements
|
|
@@ -67,4 +92,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
67
92
|
- Removed next and previous versions components since we only need latest and all versions logic [David Ichim - [`4df102f`](https://github.com/eea/volto-eea-versions/commit/4df102f95744e7e95e26ccd386307973e9dcf90d)]
|
|
68
93
|
- Started adding latest version and all version blocks while maintaining the previous logic for previous components [David Ichim - [`9f9d04b`](https://github.com/eea/volto-eea-versions/commit/9f9d04b4fda0b9606ffb038bdd4c53615ce54d3e)]
|
|
69
94
|
- initial import of boilerplate code needed to have the 2 version blocks available [David Ichim - [`e631e27`](https://github.com/eea/volto-eea-versions/commit/e631e273ce4f7782f0d721815e6d8f0305fa7d32)]
|
|
95
|
+
- Fixed error from package.json after error in yarn bootstrap [David Ichim - [`fb1810b`](https://github.com/eea/volto-eea-versions/commit/fb1810b0dfa3c2bbdfe09a18efa4836d2be2d2eb)]
|
|
96
|
+
- yarn bootstrap [David Ichim - [`63d4d93`](https://github.com/eea/volto-eea-versions/commit/63d4d934aa14c5df966a0e443f648bb8eb7b2619)]
|
|
70
97
|
- Initial commit [Alin Voinea - [`0c11208`](https://github.com/eea/volto-eea-versions/commit/0c11208f3fae44b66b185de3dd2994ebae91dc9b)]
|
package/README.md
CHANGED
|
@@ -95,6 +95,65 @@ See [RELEASE.md](https://github.com/eea/volto-eea-versions/blob/master/RELEASE.m
|
|
|
95
95
|
|
|
96
96
|
See [DEVELOP.md](https://github.com/eea/volto-eea-versions/blob/master/DEVELOP.md).
|
|
97
97
|
|
|
98
|
+
## Secret Scanning
|
|
99
|
+
|
|
100
|
+
This repository uses the Betterleaks GitHub Action to scan the current
|
|
101
|
+
repository content on every push and pull request. The scan uses the rules in
|
|
102
|
+
`.gitleaks.toml` and uploads a `betterleaks-report` artifact when a finding is
|
|
103
|
+
detected.
|
|
104
|
+
|
|
105
|
+
If the optional SMTP secrets are configured, failed scans also send an email to
|
|
106
|
+
the last commit committer. The workflow expects these repository or
|
|
107
|
+
organization secrets:
|
|
108
|
+
|
|
109
|
+
- `SMTP_URL`
|
|
110
|
+
- `SMTP_PORT` (optional, defaults to `25`)
|
|
111
|
+
- `SMTP_EMAIL`
|
|
112
|
+
- `SMTP_PASSWORD` (optional if the SMTP server does not require authentication)
|
|
113
|
+
|
|
114
|
+
Port `465` is sent with direct TLS; other ports use the default SMTP handshake.
|
|
115
|
+
The email includes a short finding summary from the redacted Betterleaks report,
|
|
116
|
+
including the redacted matched line from each finding.
|
|
117
|
+
|
|
118
|
+
There are three common outcomes:
|
|
119
|
+
|
|
120
|
+
1. **Everything is OK.** The `Betterleaks / Scan for secrets` check is green and
|
|
121
|
+
no action is needed. Regular references to runtime values are OK, for example:
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
const tokenFromCookie = req.universalCookies.get('auth_token');
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
2. **A real secret was found.** The check is red and the workflow log asks you to
|
|
128
|
+
download the `betterleaks-report` artifact. Open the artifact from the GitHub
|
|
129
|
+
Actions run and check the reported file, line and rule. Remove the committed
|
|
130
|
+
value, move it to the proper secret store, and rotate it if it was exposed.
|
|
131
|
+
A report entry looks like this:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"RuleID": "secret-literal-assignment",
|
|
136
|
+
"File": "src/config.js",
|
|
137
|
+
"StartLine": 12,
|
|
138
|
+
"Secret": "[REDACTED]"
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
3. **The finding is a false positive.** Keep the value only if it is clearly not
|
|
143
|
+
sensitive, such as a test fixture, placeholder, or public example. Add
|
|
144
|
+
`betterleaks:allow` on the same line and include a short explanation in the
|
|
145
|
+
pull request.
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
const testPassword = 'admin'; //betterleaks:allow
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
password: "admin" #betterleaks:allow
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Do not add `betterleaks:allow` to real credentials.
|
|
156
|
+
|
|
98
157
|
## Copyright and license
|
|
99
158
|
|
|
100
159
|
The Initial Owner of the Original Code is European Environment Agency (EEA).
|
package/RELEASE.md
CHANGED
|
@@ -33,7 +33,7 @@ Release-it is a tool that automates 4 important steps in the release process:
|
|
|
33
33
|
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
export GITHUB_TOKEN=
|
|
36
|
+
export GITHUB_TOKEN="${GITHUB_TOKEN}"
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { withEEAVersions } from './withEEAVersions';
|
|
3
3
|
import { formattedDate } from './helpers';
|
|
4
|
-
import
|
|
4
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
5
5
|
|
|
6
6
|
const propsAreEqual = (prevProps, nextProps) => {
|
|
7
7
|
return prevProps['@id'] === nextProps['@id'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { withEEAVersions } from './withEEAVersions';
|
|
3
3
|
import { formattedDate } from './helpers';
|
|
4
|
-
import
|
|
4
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
5
5
|
|
|
6
6
|
const propsAreEqual = (prevProps, nextProps) => {
|
|
7
7
|
return prevProps['@id'] === nextProps['@id'];
|
package/src/Blocks/index.js
CHANGED
|
@@ -14,6 +14,7 @@ const applyConfig = (config) => {
|
|
|
14
14
|
icon: codeSVG,
|
|
15
15
|
group: 'common',
|
|
16
16
|
view: LatestVersion,
|
|
17
|
+
edit: LatestVersion,
|
|
17
18
|
schema: BlockSettingsSchema,
|
|
18
19
|
restricted: false,
|
|
19
20
|
mostUsed: false,
|
|
@@ -32,6 +33,7 @@ const applyConfig = (config) => {
|
|
|
32
33
|
icon: codeSVG,
|
|
33
34
|
group: 'common',
|
|
34
35
|
view: AllVersions,
|
|
36
|
+
edit: AllVersions,
|
|
35
37
|
schema: BlockSettingsSchema,
|
|
36
38
|
restricted: false,
|
|
37
39
|
blockHasValue: hasVersionsBlockValue,
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { useDispatch, useSelector } from 'react-redux';
|
|
3
3
|
import useDeepCompareEffect from 'use-deep-compare-effect';
|
|
4
4
|
|
|
5
|
-
import { getBaseUrl } from '@plone/volto/helpers';
|
|
6
|
-
import { getEEAVersions } from '
|
|
5
|
+
import { getBaseUrl } from '@plone/volto/helpers/Url/Url';
|
|
6
|
+
import { getEEAVersions } from '@eeacms/volto-eea-versions/actions';
|
|
7
7
|
|
|
8
8
|
export function withEEAVersions(WrappedComponent) {
|
|
9
9
|
function memoizedSelector(prev, next) {
|