cwielenb/CNCF-Dataset huggingface dataset:
Project: StarRocks (App Definition and Development / Database)
File: to_iso8601.md

displayed_sidebar: "English" Converts the specified date into a string in ISO 8601 format. ```Haskell VARCHAR TO_ISO8601(DATETIME | DATE date) ``` `date`: the date you want to convert. It must be a valid date or date expression. Example 1: Convert the date `2020-01-01` into a string in ISO 8601 format. ```SQL MySQL > select to_iso8601(date'2020-01-01'); +--+ | to_iso8601('2020-01-01') | +--+ | 2020-01-01 | +--+ ``` Example 2: Convert the date `2020-01-01 00:00:00.01` into a string in ISO 8601 format. ```SQL MySQL > select to_iso8601(datetime'2020-01-01 00:00:00.01'); ++ | to_iso8601('2020-01-01 00:00:00.010000') | ++ | 2020-01-01T00:00:00.010000 | ++ ``` TO_ISO8601
Project: DevSpace (App Definition and Development / Application Definition & Image Build)
File: devspace_use_context.md

title: "Command - devspace use context" sidebar_label: devspace use context Tells DevSpace which kube context to use ``` devspace use context [flags] ``` ``` Switch the current kube context Example: devspace use context my-context ``` ``` -h, --help help for context ``` ``` --config string The devspace config file to use --debug Prints the stack trace if an error occurs --disable-profile-activation If true will ignore all profile activations --inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems (default 180) --kube-context string The kubernetes context to use -n, --namespace string The kubernetes namespace to use --no-warn If true does not show any warning when deploying into a different namespace or kube-context than before -p, --profile strings The DevSpace profiles to apply. Multiple profiles are applied in the order they are specified --profile-parent strings One or more profiles that should be applied before the specified profile (e.g. devspace dev --profile-parent=base1 --profile-parent=base2 --profile=my-profile) --profile-refresh If true will pull and re-download profile parent sources --restore-vars If true will restore the variables from kubernetes before loading the config --save-vars If true will save the variables to kubernetes after loading the config --silent Run in silent mode and prevents any devspace log output except panics & fatals -s, --switch-context DEPRECATED: Switches and uses the last kube context and namespace that was used to deploy the DevSpace project --var strings Variables to override during execution (e.g. --var=MYVAR=MYVALUE) --vars-secret string The secret to restore/save the variables from/to, if --restore-vars or --save-vars is enabled (default "devspace-vars") ```
Project: KICS (Provisioning / Security & Compliance)
File: b84a0b47-2e99-4c9f-8933-98bcabe2b94d.md

title: Run Using apt hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: b84a0b47-2e99-4c9f-8933-98bcabe2b94d Query name: Run Using apt Platform: Dockerfile Severity: <span style="color:#edd57e">Low</span> Category: Supply-Chain URL: apt is discouraged by the linux distributions as an unattended tool as its interface may suffer changes between versions. Better use the more stable apt-get and apt-cache<br> ```dockerfile title="Positive test num. 1 - dockerfile file" hl_lines="2" FROM busybox:1.0 RUN apt install curl HEALTHCHECK CMD curl --fail http://localhost:3000 || exit 1 ``` ```dockerfile title="Negative test num. 1 - dockerfile file" FROM busybox:1.0 RUN apt-get install curl HEALTHCHECK CMD curl --fail http://localhost:3000 || exit 1 ```
Project: KICS (Provisioning / Security & Compliance)
File: 1e434b25-8763-4b00-a5ca-ca03b7abbb66.md

title: Name Is Not Snake Case hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 1e434b25-8763-4b00-a5ca-ca03b7abbb66 Query name: Name Is Not Snake Case Platform: Terraform Severity: <span style="color:#5bc0de">Info</span> Category: Best Practices URL: All names should follow snake case pattern.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="7" variable "cluster_name" { default = "example" description = "cluster name" type = string } resource "awsekscluster" "positiveExample" { dependson = [awscloudwatchloggroup.example] enabledclusterlog_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"] name = var.cluster_name } module "acm" { source = "terraform-aws-modules/acm/aws" version = "~> v2.0" domainname = var.sitedomain zoneid = data.awsroute53zone.this.zoneid tags = var.tags providers = { aws = aws.useast1 # cloudfront needs acm certificate to be from "us-east-1" region } } ``` ```tf title="Positive test num. 2 - tf file" hl_lines="14" variable "cluster_name" { default = "example" description = "cluster name" type = string } resource "awsekscluster" "positive2" { dependson = [awscloudwatchloggroup.example] enabledclusterlog_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"] name = var.cluster_name } module "ACMPositive2" { source = "terraform-aws-modules/acm/aws" version = "~> v2.0" domainname = var.sitedomain zoneid = data.awsroute53zone.this.zoneid tags = var.tags providers = { aws = aws.useast1 # cloudfront needs acm certificate to be from "us-east-1" region } } ``` ```tf title="Negative test num. 1 - tf file" variable "cluster_name" { default = "example" description = "cluster name" type = string } module "acm" { source = "terraform-aws-modules/acm/aws" version = "~> v2.0" domainname = var.sitedomain zoneid = data.awsroute53zone.this.zoneid tags = var.tags providers = { aws = aws.useast1 # cloudfront needs acm certificate to be from "us-east-1" region } } resource "awsekscluster" "negative1" { dependson = [awscloudwatchloggroup.example] enabledclusterlog_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"] name = var.cluster_name } ```
Project: Docker Compose (App Definition and Development / Application Definition & Image Build)
File: compose_stats.md

<!MARKERGENSTART--> Display a live stream of container(s) resource usage statistics | Name | Type | Default | Description | |:--|:|:--|:-| | `-a`, `--all` | | | Show all containers (default shows just running) | | `--dry-run` | | | Execute command in dry run mode | | `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `--no-stream` | | | Disable streaming stats and only pull the first result | | `--no-trunc` | | | Do not truncate output | <!MARKERGENEND-->
Project: YDB (App Definition and Development / Database)
File: callable.md

Create a callable value with the specified signature from a lambda function. It's usually used to put callable values into containers. Arguments: Type. Lambda function. Examples: ```yql $lambda = ($x) -> { RETURN CAST($x as String) }; $callables = AsTuple( Callable(Callable<(Int32)->String>, $lambda), Callable(Callable<(Bool)->String>, $lambda), ); SELECT $callables.0(10), $callables.1(true); ```
Project: Backstage (App Definition and Development / Application Definition & Image Build)
File: ConfluenceCollator.md

ConfluenceCollator.ts reference ```ts import { DocumentCollator } from '@backstage/plugin-search-common'; import fetch from 'cross-fetch'; export class ConfluenceCollator implements DocumentCollator { public readonly type: string = 'confluence'; async execute() { const ConfluenceUrlBase = 'https://{CONFLUENCE-ORG-NAME}.atlassian.net/wiki/rest/api'; async function getConfluenceData(requestUrl: string) { var emptyJson = {}; try { const res = await fetch(requestUrl, { method: 'get', headers: { Authorization: `Basic ${process.env.CONFLUENCE_TOKEN}`, }, }); if (res.ok) { return await res.json(); } } catch (err) { console.error(err); } return emptyJson; } async function getSpaces(): Promise<string[]> { const data = await getConfluenceData( `${ConfluenceUrlBase}/space?&limit=1000&type=global&status=current`, ); let spacesList = []; if (data['results']) { const results = data['results']; for (const result of results) { spacesList.push(result['key']); } } return spacesList; } async function getDocumentsFromSpaces(spaces: string[]): Promise<string[]> { let documentsList = []; for (var space of spaces) { let next = true; let requestUrl = `${ConfluenceUrlBase}/content?limit=1000&status=current&spaceKey=${space}`; while (next) { const data = await getConfluenceData(requestUrl); if (data['results']) { const results = data['results']; for (const result of results) { documentsList.push(result); } if (data) { requestUrl = data + data; } else { next = false; } } else { break; } } } return documentsList; } async function getDocumentInfo(documents: string[]) { let documentInfo = []; for (var documentUrl of documents) { const data = await getConfluenceData( documentUrl + '?expand=body.storage', ); if (data['status'] && data['status'] == 'current') { const documentMetaData = { title: data['title'], text: data['value'], location: data + data, }; documentInfo.push(documentMetaData); } } return documentInfo; } const spacesList = await getSpaces(); const documentsList = await getDocumentsFromSpaces(spacesList); const documentMetaDataList = await getDocumentInfo(documentsList); return documentMetaDataList; } } ```
Project: ClickHouse (App Definition and Development / Database)
File: quota_limits.md

slug: /en/operations/system-tables/quota_limits Contains information about maximums for all intervals of all quotas. Any number of rows or zero can correspond to one quota. Columns: `quota_name` () Quota name. `duration` () Length of the time interval for calculating resource consumption, in seconds. `israndomizedinterval` () Logical value. It shows whether the interval is randomized. Interval always starts at the same time if it is not randomized. For example, an interval of 1 minute always starts at an integer number of minutes (i.e.it can start at 11:20:00, but it never starts at 11:20:01), an interval of one day always starts at midnight UTC. If interval is randomized, the very first interval starts at random time, and subsequent intervals starts one by one. Values: `0` Interval is not randomized. `1` Interval is randomized. `max_queries` (()) Maximum number of queries. `maxqueryselects` (()) Maximum number of select queries. `maxqueryinserts` (()) Maximum number of insert queries. `max_errors` (()) Maximum number of errors. `maxresultrows` (()) Maximum number of result rows. `maxresultbytes` (()) Maximum number of RAM volume in bytes used to store a queries result. `maxreadrows` (()) Maximum number of rows read from all tables and table functions participated in queries. `maxreadbytes` (()) Maximum number of bytes read from all tables and table functions participated in queries. `maxexecutiontime` (()) Maximum of the query execution time, in seconds.
Project: YugabyteDB (App Definition and Development / Database)
File: set.md

title: SET linkTitle: SET description: SET menu: preview: parent: api-yedis weight: 2270 aliases: /preview/api/redis/set /preview/api/yedis/set type: docs `SET key string_value [EX seconds] [PX milliseconds] [NX|XX]` This command inserts `string_value` to be hold at `key`, where `EX seconds` sets the expire time in `seconds`, `PX milliseconds` sets the expire time in `milliseconds`, `NX` sets the key only if it does not already exist, and `XX` sets the key only if it already exists. If the `key` is already associated with a value, it is overwritten regardless of its type. All parameters that are associated with the `key`, such as data type and time to live, are discarded. Returns status string. ```sh $ SET yugakey "Yugabyte" ``` ``` "OK" ``` ```sh $ GET yugakey ``` ``` "Yugabyte" ``` , , , , , , ,
Project: ArangoDB (App Definition and Development / Database)
File: implicit_failure_error_move_constructor.md

+++ title = "`basicoutcome(failuretype<EC> &&)`" description = "Implicit error-from-failure-type-sugar move constructor. Available if `predicate::enablecompatibleconversion<void, EC, void, void>` is true. Constexpr, triviality and noexcept propagating." categories = ["constructors", "implicit-constructors", "tagged-constructors"] weight = 530 +++ Implicit error-from-failure-type-sugar move constructor used to disambiguate the construction of the error type. Calls {{% api "void onoutcomemoveconstruction(T *, U &&) noexcept" %}} with `this` and `failuretype<EC> &&`. Requires: `predicate::enablecompatibleconversion<void, EC, void, void>` is true. Complexity: Same as for the `error_type` constructor which accepts `EC`. Constexpr, triviality and noexcept of underlying operations is propagated.
Project: KubeBlocks by ApeCloud (App Definition and Development / Database)
File: kbcli_bench_sysbench_prepare.md

title: kbcli bench sysbench prepare Prepare the data of SysBench for a cluster ``` kbcli bench sysbench prepare [ClusterName] [flags] ``` ``` kbcli bench sysbench prepare mycluster --user xxx --password xxx --database mydb kbcli bench sysbench prepare mycluster --user xxx --password xxx --database mydb --tables 10 --size 25000 ``` ``` -h, --help help for prepare ``` ``` --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. --as-uid string UID to impersonate for the operation. --cache-dir string Default cache directory (default "$HOME/.kube/cache") --certificate-authority string Path to a cert file for the certificate authority --client-certificate string Path to a client certificate file for TLS --client-key string Path to a client key file for TLS --cluster string The name of the kubeconfig cluster to use --context string The name of the kubeconfig context to use --database string database name --disable-compression If true, opt-out of response compression for all requests to the server --flag int the flag of sysbench, 0(normal), 1(long), 2(three nodes) --host string the host of database --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure --kubeconfig string Path to the kubeconfig file to use for CLI requests. --match-server-version Require server version to match client version -n, --namespace string If present, the namespace scope for this CLI request --password string the password of database --port int the port of database --read-percent int the percent of read, only useful when type is oltpreadwrite_pct --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") -s, --server string The address and port of the Kubernetes API server --size int the data size of per table (default 25000) --tables int the number of tables (default 10) --threads ints the number of threads, you can set multiple values, like 4,8 (default [4]) --times int the number of test times (default 60) --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used --token string Bearer token for authentication to the API server --type strings sysbench type, you can set multiple values (default [oltpreadwrite]) --user string the user of database --write-percent int the percent of write, only useful when type is oltpreadwrite_pct ``` - run a SysBench benchmark
Project: Meshery (Provisioning / Automation & Configuration)
File: 10-12-2023-03-20-10_81317eb2.md

timestamp: "2023-10-12 03:19:51 UTC Thu" meshery-component: meshery-consul meshery-component-version: edge meshery-server-version: "*name" k8s-distro: minikube k8s-version: "v1.25.2" service-mesh: Consul service-mesh-version: "v1.2.2" tests: consul-client: null consul-server: null overall-status: "failing"
Project: StarRocks (App Definition and Development / Database)
File: days_add.md

displayed_sidebar: "English" Adds a specified number of days to a given date or date time. ```Haskell DATETIME days_add(DATETIME|DATE date, INT n); ``` `date`: a DATE or DATETIME expression. `n`: the number of days to add. Returns a DATETIME value. If any input parameter is NULL or invalid, NULL is returned. If the output date exceeds the range of [0000-01-01 00:00:00, 9999-12-31 00:00:00], NULL is returned. ```Plain Text select days_add('2023-10-31 23:59:59', 1); ++ | days_add('2023-10-31 23:59:59', 1) | ++ | 2023-11-01 23:59:59 | ++ select days_add('2023-10-31 23:59:59', 1000); ++ | days_add('2023-10-31 23:59:59', 1000) | ++ | 2026-07-27 23:59:59 | ++ select days_add('2023-10-31', 1); ++ | days_add('2023-10-31', 1) | ++ | 2023-11-01 00:00:00 | ++ ``` DAY,day
Project: kube-hunter (Provisioning / Security & Compliance)
File: KHV051.md

vid: KHV051 title: Exposed Existing Privileged Containers Via Secure Kubelet Port categories: [Access Risk] severity: high The kubelet is configured to allow anonymous (unauthenticated) requests to its HTTPs API. This may expose certain information and capabilities to an attacker with access to the kubelet API. A privileged container is given access to all devices on the host and can work at the kernel level. It is declared using the `Pod.spec.containers[].securityContext.privileged` attribute. This may be useful for infrastructure containers that perform setup work on the host, but is a dangerous attack vector. Furthermore, if the kubelet and the API server authentication mechanisms are (mis)configured such that anonymous requests can execute commands via the API within the containers (specifically privileged ones), a malicious actor can leverage such capabilities to do way more damage in the cluster than expected: e.g. start/modify process on host. Ensure kubelet is protected using `--anonymous-auth=false` kubelet flag. Allow only legitimate users using `--client-ca-file` or `--authentication-token-webhook` kubelet flags. This is usually done by the installer or cloud provider. Minimize the use of privileged containers. Use Pod Security Policies to enforce using `privileged: false` policy. Review the RBAC permissions to Kubernetes API server for the anonymous and default service account, including bindings. Ensure node(s) runs active filesystem monitoring. Set `--insecure-port=0` and remove `--insecure-bind-address=0.0.0.0` in the Kubernetes API server config. Remove `AlwaysAllow` from `--authorization-mode` in the Kubernetes API server config. Alternatively, set `--anonymous-auth=false` in the Kubernetes API server config; this will depend on the API server version running.
Project: ClickHouse (App Definition and Development / Database)
File: v22.5.2.53-stable.md

sidebar_position: 1 sidebar_label: 2022 Backported in : SALT is allowed for CREATE USER <user> IDENTIFIED WITH sha256_hash. (). Backported in : - Change `all|noarch` packages to architecture-dependent - Fix some documentation for it - Push aarch64|arm64 packages to artifactory and release assets - Fixes . (). Backported in : Fix unexpected errors with a clash of constant strings in aggregate function, prewhere and join. Close . (). Backported in : Throw an exception when GROUPING SETS used with ROLLUP or CUBE. (). Backported in : Fix logical error in normalizeUTF8 functions. Closes . (). Backported in : Fix setting castipv4ipv6defaultonconversionerror for internal cast function. Closes . (). Backported in : Fix bug with nested short-circuit functions that led to execution of arguments even if condition is false. Closes . (). Backported in : Do not allow recursive usage of OvercommitTracker during logging. Fixes cc @tavplubix @davenger. (). Backported in : Fix incorrect result of distributed queries with `DISTINCT` and `LIMIT`. Fixes . (). Backported in : Fix parts removal (will be left forever if they had not been removed on server shutdown) after incorrect server shutdown. (). Backported in : Fix table creation to avoid replication issues with pre-22.4 replicas. (). Backported in : Now it's possible to start a clickhouse-server and attach/detach tables even for tables with the incorrect values of IPv4/IPv6 representation. Proper fix for issue . (). Backported in : Adapt some more nodes to avoid issues with pre-22.4 replicas. (). Backported in : `rankCorr` function will work correctly if some arguments are NaNs. This closes . (). Backported in : Fix use-after-free for Map combinator that leads to incorrect result. (). Try to fix some trash (). Update protobuf files for kafka and rabbitmq (). Try fix `testgrpcprotocol/test.py::test_progress` (). Try to fix BC check (). Update docker-compose to try get rid of v1 errors (). Fix backports diff ().
Project: Open Service Broker API (App Definition and Development / Application Definition & Image Build)
File: compatibility.md

| Release or Feature | Introduced | Cloud Foundry | Kubernetes | | | | | | | `credentials` binding | v2.10 | | | | `syslog_drain` binding | v2.10 | | - | | `route_forwarding` binding | v2.10 | | - | | `volume_mounts` binding | v2.10 | | - | | | Early 2016 | | | | Bindable and non-bindable plans | v2.11 | | | | | Nov 15, 2016 | | | | `context` for creating and updating a Service Instance | v2.12 | | | | | June 13, 2017 | | | | `schemas` in catalog | v2.13 | | | | `context` for creating a Service Binding | v2.13 | | | | `originating identity` header | v2.13 | | | | Opaque Bearer Token Authentication | v2.13 | - | | | | Sep 27, 2017 | | | | GET endpoint for Service Instances | v2.14 | | - | | GET endpoint for Service Bindings | v2.14 | | | | Async Bindings | v2.14 | | | | | July 24, 2018 | | | | `request identity header` to uniquely identify a specific request | v2.15 | - | - | | `maintenance_info` used for Service Instance upgrades | v2.15 | | - | | `plan_upgradeable` field in Service Plan object is used to determine if a plan change can be performed | v2.15 | | - | | `maximumpollingduration` field in Service Plan object is adhered to | v2.15 | | - | | `Retry-After` response header from calls to last operation is adhered to | v2.15 | | - | | | June 25, 2019 | | |
Project: KICS (Provisioning / Security & Compliance)
File: 2e8d4922-8362-4606-8c14-aa10466a1ce3.md

title: Communication Over HTTP hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 2e8d4922-8362-4606-8c14-aa10466a1ce3 Query name: Communication Over HTTP Platform: Ansible Severity: <span style="color:#ff7213">Medium</span> Category: Insecure Configurations URL: Using HTTP URLs (without encryption) could lead to security vulnerabilities and risks<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="6" name: Verificar o status de um site usando o mdulo uri hosts: localhost tasks: name: Verificar o status do site ansible.builtin.uri: url: "http://www.example.com" method: GET register: site_response name: Exibir resposta do site debug: var: site_response ``` ```yaml title="Negative test num. 1 - yaml file" name: Verificar o status de um site usando o mdulo uri hosts: localhost tasks: name: Verificar o status do site ansible.builtin.uri: url: "https://www.example.com" method: GET register: site_response name: Exibir resposta do site debug: var: site_response ```