Skip to content

Commit 8f445d8

Browse files
Merge branch '7.9' into backport/7.9/pr-72928
2 parents 875fd9f + 9957fe1 commit 8f445d8

300 files changed

Lines changed: 5304 additions & 2811 deletions

File tree

Some content is hidden

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

.ci/pipeline-library/src/test/KibanaBasePipelineTest.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ class KibanaBasePipelineTest extends BasePipelineTest {
7878
return helper.callStack.find { it.methodName == name }
7979
}
8080

81+
def fnMocks(String name) {
82+
helper.callStack.findAll { it.methodName == name }
83+
}
84+
8185
void mockFailureBuild() {
8286
props([
8387
buildUtils: [

.ci/pipeline-library/src/test/slackNotifications.groovy

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,67 @@ class SlackNotificationsTest extends KibanaBasePipelineTest {
5959
args.blocks[2].text.text.toString()
6060
)
6161
}
62+
63+
@Test
64+
void 'sendFailedBuild() should call slackSend() with a backup message when first attempt fails'() {
65+
mockFailureBuild()
66+
def counter = 0
67+
helper.registerAllowedMethod('slackSend', [Map.class], { ++counter > 1 })
68+
slackNotifications.sendFailedBuild()
69+
70+
def args = fnMocks('slackSend')[1].args[0]
71+
72+
def expected = [
73+
channel: '#kibana-operations-alerts',
74+
username: 'Kibana Operations',
75+
iconEmoji: ':jenkins:',
76+
color: 'danger',
77+
message: ':broken_heart: elastic / kibana # master #1',
78+
]
79+
80+
expected.each {
81+
assertEquals(it.value.toString(), args[it.key].toString())
82+
}
83+
84+
assertEquals(
85+
":broken_heart: *<http://jenkins.localhost:8080/job/elastic+kibana+master/1/|elastic / kibana # master #1>*" +
86+
"\n\nFirst attempt at sending this notification failed. Please check the build.",
87+
args.blocks[0].text.text.toString()
88+
)
89+
}
90+
91+
@Test
92+
void 'getTestFailures() should truncate list of failures to 10'() {
93+
prop('testUtils', [
94+
getFailures: {
95+
return (1..12).collect {
96+
return [
97+
url: Mocks.TEST_FAILURE_URL,
98+
fullDisplayName: "Failure #${it}",
99+
]
100+
}
101+
},
102+
])
103+
104+
def message = (String) slackNotifications.getTestFailures()
105+
106+
assertTrue("Message ends with truncated indicator", message.endsWith("...and 2 more"))
107+
assertTrue("Message contains Failure #10", message.contains("Failure #10"))
108+
assertTrue("Message does not contain Failure #11", !message.contains("Failure #11"))
109+
}
110+
111+
@Test
112+
void 'shortenMessage() should truncate a long message, but leave parts that fit'() {
113+
assertEquals('Hello\nHello\n[...truncated...]', slackNotifications.shortenMessage('Hello\nHello\nthis is a long string', 29))
114+
}
115+
116+
@Test
117+
void 'shortenMessage() should not modify a short message'() {
118+
assertEquals('Hello world', slackNotifications.shortenMessage('Hello world', 11))
119+
}
120+
121+
@Test
122+
void 'shortenMessage() should truncate an entire message with only one part'() {
123+
assertEquals('[...truncated...]', slackNotifications.shortenMessage('Hello world this is a really long message', 40))
124+
}
62125
}

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ kibanaPipeline(timeoutMinutes: 155, checkPrChanges: true, setCommitStatus: true)
4444
'xpack-savedObjectsFieldMetrics': kibanaPipeline.functionalTestProcess('xpack-savedObjectsFieldMetrics', './test/scripts/jenkins_xpack_saved_objects_field_metrics.sh'),
4545
// 'xpack-pageLoadMetrics': kibanaPipeline.functionalTestProcess('xpack-pageLoadMetrics', './test/scripts/jenkins_xpack_page_load_metrics.sh'),
4646
'xpack-securitySolutionCypress': { processNumber ->
47-
whenChanged(['x-pack/plugins/security_solution/', 'x-pack/test/security_solution_cypress/']) {
47+
whenChanged(['x-pack/plugins/security_solution/', 'x-pack/test/security_solution_cypress/', 'x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/', 'x-pack/plugins/triggers_actions_ui/public/application/context/actions_connectors_context.tsx']) {
4848
kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypress', './test/scripts/jenkins_security_solution_cypress.sh')(processNumber)
4949
}
5050
},

docs/CHANGELOG.asciidoc

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,23 @@ This section summarizes the changes in each release.
4242
[[release-notes-7.8.1]]
4343
== {kib} 7.8.1
4444

45-
coming::[7.8.1]
46-
4745
See also <<breaking-changes-7.8,breaking changes in 7.8>>.
4846

47+
[float]
48+
[[security-update-7.8.1]]
49+
=== Security updates
50+
* In {kib} 7.8.1 and earlier, there is a denial of service (DoS) flaw in Timelion. Attackers can construct a URL that when viewed
51+
by a {kib} user, the {kib} process consumes large amounts of CPU and becomes unresponsive,
52+
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7016[CVE-2020-7016].
53+
+
54+
You must upgrade to 7.8.1. If you are unable to upgrade, set `timelion.enabled` to `false` in your kibana.yml file to disable Timelion.
55+
56+
* In all {kib} versions, region map visualizations contain a stored XSS flaw. Attackers that can edit or create region map visualizations can obtain sensitive information
57+
or perform destructive actions on behalf of {kib} users who view the region map visualization,
58+
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7017[CVE-2020-7017].
59+
+
60+
You must upgrade to 7.8.1. If you are unable to upgrade, set `xpack.maps.enabled`, `region_map.enabled`, and `tile_map.enabled` to `false` in kibana.yml to disable map visualizations.
61+
4962
[float]
5063
[[bug-v7.8.1]]
5164
=== Bug fixes

docs/developer/architecture/code-exploration.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,9 @@ WARNING: Missing README.
526526
See Configuring security in Kibana.
527527
528528
529-
- {kib-repo}blob/{branch}/x-pack/plugins/security_solution[securitySolution]
529+
- {kib-repo}blob/{branch}/x-pack/plugins/security_solution/README.md[securitySolution]
530530
531-
WARNING: Missing README.
531+
Welcome to the Kibana Security Solution plugin! This README will go over getting started with development and testing.
532532
533533
534534
- {kib-repo}blob/{branch}/x-pack/plugins/snapshot_restore/README.md[snapshotRestore]

docs/settings/reporting-settings.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can configure `xpack.reporting` settings in your `kibana.yml` to:
2121
| Set to `false` to disable the {report-features}.
2222

2323
| `xpack.reporting.encryptionKey`
24-
| Set to any text string. By default, {kib} will generate a random key when it
24+
| Set to an alphanumeric, at least 32 characters long text string. By default, {kib} will generate a random key when it
2525
starts, which will cause pending reports to fail after restart. Configure this
2626
setting to preserve the same key across multiple restarts and multiple instances of {kib}.
2727

docs/user/reporting/configuring-reporting.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ reporting job metadata.
2323

2424
To set a static encryption key for reporting, set the
2525
`xpack.reporting.encryptionKey` property in the `kibana.yml`
26-
configuration file. You can use any text string as the encryption key.
26+
configuration file. You can use any alphanumeric, at least 32 characters long text string as the encryption key.
2727

2828
[source,yaml]
2929
--------------------------------------------------------------------------------

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@
458458
"jest-cli": "^25.5.4",
459459
"jest-environment-jsdom-thirteen": "^1.0.1",
460460
"jest-raw-loader": "^1.0.1",
461-
"jimp": "^0.9.6",
461+
"jimp": "^0.14.0",
462462
"json5": "^1.0.1",
463463
"karma": "5.0.2",
464464
"karma-chrome-launcher": "2.2.0",

src/dev/build/tasks/os_packages/docker_generator/bundle_dockerfiles.js renamed to src/dev/build/tasks/os_packages/docker_generator/bundle_dockerfiles.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@
1818
*/
1919

2020
import { resolve } from 'path';
21-
import { compressTar, copyAll, mkdirp, write } from '../../../lib';
21+
22+
import { ToolingLog } from '@kbn/dev-utils';
23+
24+
import { compressTar, copyAll, mkdirp, write, Config } from '../../../lib';
2225
import { dockerfileTemplate } from './templates';
26+
import { TemplateContext } from './template_context';
2327

24-
export async function bundleDockerFiles(config, log, build, scope) {
28+
export async function bundleDockerFiles(config: Config, log: ToolingLog, scope: TemplateContext) {
2529
log.info(
2630
`Generating kibana${scope.imageFlavor}${scope.ubiImageFlavor} docker build context bundle`
2731
);
@@ -50,17 +54,15 @@ export async function bundleDockerFiles(config, log, build, scope) {
5054
// Compress dockerfiles dir created inside
5155
// docker build dir as output it as a target
5256
// on targets folder
53-
await compressTar(
54-
{
55-
archiverOptions: {
56-
gzip: true,
57-
gzipOptions: {
58-
level: 9,
59-
},
57+
await compressTar({
58+
source: dockerFilesBuildDir,
59+
destination: dockerFilesOutputDir,
60+
archiverOptions: {
61+
gzip: true,
62+
gzipOptions: {
63+
level: 9,
6064
},
61-
createRootDirectory: false,
6265
},
63-
dockerFilesBuildDir,
64-
dockerFilesOutputDir
65-
);
66+
createRootDirectory: false,
67+
});
6668
}

src/dev/build/tasks/os_packages/docker_generator/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@
1717
* under the License.
1818
*/
1919

20-
// @ts-expect-error not ts yet
2120
export { runDockerGenerator, runDockerGeneratorForUBI } from './run';

0 commit comments

Comments
 (0)