cwielenb/CNCF-Dataset huggingface dataset:
Project: YugabyteDB (App Definition and Development / Database)
File: expression-index-ysql.md

title: Expression indexes in YugabyteDB YSQL headerTitle: Expression indexes linkTitle: Expression indexes description: Using expression indexes in YSQL headContent: Explore expression indexes in YugabyteDB using YSQL menu: v2.18: identifier: expression-index-ysql parent: explore-indexes-constraints weight: 250 type: docs <ul class="nav nav-tabs-alt nav-tabs-yb"> <li > <a href="../expression-index-ysql/" class="nav-link active"> <i class="icon-postgres" aria-hidden="true"></i> YSQL </a> </li> </ul> Indexes are typically created based solely on the columns, but using an expression index (also called a function-based index) you can create an index based on a generic expression (function or modification of data entered) computed from table columns. ```sql CREATE INDEX indexname ON tablename( (expression) ); ``` You can omit the parentheses around the expression where the expression is a simple function call. Once defined, the index is used when the expression that defines the index is included in the `WHERE` or `ORDER BY` clause in the YSQL statement. {{% explore-setup-single %}} A common use case of an expression index is to support case-insensitive text to enable efficient searchability. For example, suppose you have a `users` table with an `email` column to store login email addresses, and you want to maintain case-insensitive authentication. Using the WHERE clause as WHERE LOWER(email) = '<lowercaseemail>' allows you to store the email address as originally entered by the user. The following example uses the `employees` table from the Secondary indexes to show how to create an index on an expression that converts the department to lowercase to improve searchability. Verify the query plan without creating an expression index for the department `Operations`. ```sql EXPLAIN SELECT * FROM employees WHERE LOWER(department) = 'operations'; ``` ```output QUERY PLAN Seq Scan on employees (cost=0.00..105.00 rows=1000 width=68) Filter: (lower(department) = 'operations'::text) (2 rows) ``` Create an expression index using the following command: ```sql CREATE INDEX indexemployeesdepartment_lc ON employees(LOWER(department)); ``` Run the `EXPLAIN` statement again to verify that the `indexemployeesdepartment_lc` index is used to find the department regardless of case: ```sql EXPLAIN SELECT * FROM employees WHERE LOWER(department) = 'operations'; ``` ```output QUERY PLAN Index Scan using indexemployeesdepartment_lc on employees (cost=0.00..5.25 rows=10 width=68) Index Cond: (lower(department) = 'operations'::text) ``` Learn how can optimize query performance by covering all the columns needed by a query.
Project: KICS (Provisioning / Security & Compliance)
File: 20180133-a0d0-4745-bfe0-94049fbb12a9.md

title: Client Certificate Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 20180133-a0d0-4745-bfe0-94049fbb12a9 Query name: Client Certificate Disabled Platform: Ansible Severity: <span style="color:#bb2124">High</span> Category: Insecure Configurations URL: Kubernetes Clusters must be created with Client Certificate enabled, which means 'masterauth' must have 'clientcertificateconfig' with the attribute 'issueclient_certificate' equal to true<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="18 3 37" name: create a cluster1 google.cloud.gcpcontainercluster: name: my-cluster1 initialnodecount: 2 node_config: machine_type: n1-standard-4 disksizegb: 500 location: us-central1-a project: test_project auth_kind: serviceaccount serviceaccountfile: "/tmp/auth.pem" state: present name: create a cluster2 google.cloud.gcpcontainercluster: name: my-cluster2 initialnodecount: 2 master_auth: username: cluster_admin password: my-secret-password node_config: machine_type: n1-standard-4 disksizegb: 500 location: us-central1-a project: test_project auth_kind: serviceaccount serviceaccountfile: "/tmp/auth.pem" state: present name: create a cluster3 google.cloud.gcpcontainercluster: name: my-cluster3 initialnodecount: 2 master_auth: username: cluster_admin password: my-secret-password clientcertificateconfig: issueclientcertificate: no node_config: machine_type: n1-standard-4 disksizegb: 500 location: us-central1-a project: test_project auth_kind: serviceaccount serviceaccountfile: "/tmp/auth.pem" state: present ``` ```yaml title="Negative test num. 1 - yaml file" name: create a cluster google.cloud.gcpcontainercluster: name: my-cluster initialnodecount: 2 master_auth: username: cluster_admin password: my-secret-password clientcertificateconfig: issueclientcertificate: yes node_config: machine_type: n1-standard-4 disksizegb: 500 location: us-central1-a project: test_project auth_kind: serviceaccount serviceaccountfile: /tmp/auth.pem state: present ```
Project: StarRocks (App Definition and Development / Database)
File: ADMIN_CHECK_TABLET.md

displayed_sidebar: "English" This statement is used to check a group of tablets. :::tip This operation requires the SYSTEM-level OPERATE privilege. You can follow the instructions in to grant this privilege. ::: ```sql ADMIN CHECK TABLE (tabletid1, tabletid2, ...) PROPERTIES("type" = "...") ``` Note: The "type" property in tablet id and PROPERTIES must be specified. Currently, "type" only supports: Consistency: Check the consistency of replicas of the tablet. This command is asynchronous. After sending it, StarRocks will start checking the consistency among corresponding tablets. The final results will be shown in the InconsistentTabletNum column in the result of SHOW PROC "/statistic". Check the consistency of replicas on a group of specified tablets ```sql ADMIN CHECK TABLET (10000, 10001) PROPERTIES("type" = "consistency"); ```
Project: KICS (Provisioning / Security & Compliance)
File: a19b2942-142e-4e2b-93b7-6cf6a6c8d90f.md

title: AMI Shared With Multiple Accounts hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: a19b2942-142e-4e2b-93b7-6cf6a6c8d90f Query name: AMI Shared With Multiple Accounts Platform: Ansible Severity: <span style="color:#ff7213">Medium</span> Category: Access Control URL: Limits access to AWS AMIs by checking if more than one account is using the same image<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="11 5" name: Update AMI Launch Permissions, making it public amazon.aws.ec2_ami: imageid: "{{ instance.imageid }}" state: present launch_permissions: group_names: ['all'] name: Allow AMI to be launched by another account amazon.aws.ec2_ami: imageid: "{{ instance.imageid }}" state: present launch_permissions: user_ids: ['123456789012', '121212'] ``` ```yaml title="Negative test num. 1 - yaml file" name: Allow AMI to be launched by another account V2 amazon.aws.ec2_ami: imageid: '{{ instance.imageid }}' state: present launch_permissions: user_ids: ['123456789012'] ```
Project: KubeBlocks by ApeCloud (App Definition and Development / Database)
File: kbcli_cluster_create-account.md

title: kbcli cluster create-account Create account for a cluster ``` kbcli cluster create-account [flags] ``` ``` kbcli cluster create-account CLUSTERNAME --component COMPNAME --name USERNAME --password PASSWD kbcli cluster create-account CLUSTERNAME --component COMPNAME --name USERNAME kbcli cluster create-account CLUSTERNAME --name USERNAME kbcli cluster create-account --instance INSTANCE --name USERNAME ``` ``` --component string Specify the name of component to be connected. If not specified, pick the first one. -h, --help help for create-account -i, --instance string Specify the name of instance to be connected. --name string Required. Specify the name of user, which must be unique. -p, --password string Optional. Specify the password of user. The default value is empty, which means a random password will be generated. ``` ``` --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 --disable-compression If true, opt-out of response compression for all requests to the server --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 --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 --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 --user string The name of the kubeconfig user to use ``` - Cluster command.
Project: KICS (Provisioning / Security & Compliance)
File: utilities.md

KICS presents the number of lines scanned and the number of lines parsed. Both are presented in LOG messages and the JSON report. Note that the number of the lines includes empty ones. Lines scanned are the lines of the files that were scanned, in the first instance, before the "parser step". The lines parsed are the lines of the files that KICS parsed. KICS presents the resource type and the resource name fields in the JSON result of each query. These fields are available for the following platforms: Ansible, Azure Resource Manager, CloudFormation, CrossPlane, Knative, Kubernetes, Google Deployment Manager, Pulumi, ServerlessFW and Terraform. ``` { "filename": "assets/queries/azureResourceManager/accountadminsnotnotifiedbyemail/test/positive3.json", "similarity_id": "4db29b15c254f0d6b2226a9bea87e1db9098ba24ceab992646536cd33061d03f", "line": 16, "resource_type": "Microsoft.Sql/servers/databases/securityAlertPolicies", "resource_name": "sample/server/default", "issue_type": "IncorrectValue", "search_key": "properties.template.resources.name={{sample/server/default}}.properties.emailAccountAdmins", "search_line": 0, "search_value": "", "expected_value": "securityAlertPolicies.properties.emailAccountAdmins is set to true", } ```
Project: Chef InSpec (Provisioning / Security & Compliance)
File: files.md

+++ title = "Profile Files" draft = false gh_repo = "inspec" [menu] [menu.inspec] title = "Files" identifier = "inspec/profiles/files" parent = "inspec/profiles" weight = 50 +++ A Chef InSpec profile may contain additional files that can be accessed during tests. A profile file enables you to separate the logic of your tests from the data your tests check for. For example, the list of ports you require to be open. Add files to the `files` directory at the root of a profile. ```text examples/profile controls example.rb files services.yml inspec.yml ``` Use `inspec.profile.file('FILENAME.yml')` to access data from the file. With `files/services.yml` containing the following data: ```yaml service_name: httpd-alpha port: 80 service_name: httpd-beta port: 8080 ``` The tests in `example.rb` can now access this file: ```ruby my_services = yaml(content: inspec.profile.file('services.yml')).params my_services.each do |s| describe service(s['service_name']) do it { should be_running } end describe port(s['port']) do it { should be_listening } end end ```
Project: Beam (App Definition and Development / Streaming & Messaging)
File: what-is-being-computed.md

type: runners title: "What is being computed?" layout: "capability-template" <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- Summary table --> {{< documentation/capability-matrix-big cap-data="capability-matrix" cap-view="full" cap-index=0 >}}
Project: KubeDB by AppsCode (App Definition and Development / Database)
File: kubectl-dba_remote-config_mysql.md

title: Kubectl-Dba Remote-Config Mysql menu: docs_{{ .version }}: identifier: kubectl-dba-remote-config-mysql name: Kubectl-Dba Remote-Config Mysql parent: reference-cli menuname: docs{{ .version }} sectionmenuid: reference generate appbinding , secrets for remote replica generate appbinding , secrets for remote replica ``` kubectl-dba remote-config mysql [flags] ``` ``` kubectl dba remote-config mysql -n <ns> -u <username> -p$<password> -d<dnsname> <db_name> kubectl dba remote-config mysql -n <ns> -u <username> -p$<password> -d<dnsname> <db_name> ``` ``` -d, --dns string dns name for the remote replica (default "localhost") -h, --help help for mysql -n, --namespace string host namespace for the remote replica (default "default") -p, --pass string password name for the remote replica (default "password") -u, --user string user name for the remote replica (default "postgres") -y, --yes permission for alter password for the remote replica ``` ``` --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/runner/.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 --default-seccomp-profile-type string Default seccomp profile --disable-compression If true, opt-out of response compression for all requests to the server --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 --password string Password for basic authentication to the API server --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 --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 --username string Username for basic authentication to the API server ``` - generate appbinding , secrets for remote replica
Project: KubeVirt (App Definition and Development / Application Definition & Image Build)
File: guest-os-info.md

Guest operating system identity for the Virtual Machine will be provided by the label ``kubevirt.io/os`` : ``` metadata: name: myvm labels: kubevirt.io/os: win2k12r2 ``` The ``kubevirt.io/os`` label is based on the short OS identifier from . The following Short IDs are currently supported: | Short ID | Name | Version | Family | ID | ||-||--|| | fedora26 | Fedora 26 | 26 | linux | http://fedoraproject.org/fedora/26 | | fedora27 | Fedora 27 | 27 | linux | http://fedoraproject.org/fedora/27 | | rhel7.0 | Red Hat Enterprise Linux 7.0 | 7.0 | linux | http://redhat.com/rhel/7.0 | | rhel7.1 | Red Hat Enterprise Linux 7.1 | 7.1 | linux | http://redhat.com/rhel/7.1 | | rhel7.2 | Red Hat Enterprise Linux 7.2 | 7.2 | linux | http://redhat.com/rhel/7.2 | | rhel7.3 | Red Hat Enterprise Linux 7.3 | 7.3 | linux | http://redhat.com/rhel/7.3 | | rhel7.4 | Red Hat Enterprise Linux 7.4 | 7.4 | linux | http://redhat.com/rhel/7.4 | | win2k12r2 | Microsoft Windows Server 2012 R2 | 6.3 | winnt | http://microsoft.com/win/2k12r2 | | win2k16 | Microsoft Windows Server 2016 | 1709 | winnt | http://microsoft.com/win/2k16 | For the updated list please refer to kubeVirt user guide - To get a full list of operating systems from Libosinfo database: ``` $ osinfo-query os Short ID | Name | Version | ID ... fedora24 | Fedora 24 | 24 | http://fedoraproject.org/fedora/24 fedora25 | Fedora 25 | 25 | http://fedoraproject.org/fedora/25 fedora26 | Fedora 26 | 26 | http://fedoraproject.org/fedora/26 ... win2k12r2 | Microsoft Windows Server 2012 R2 | 6.3 | http://microsoft.com/win/2k12r2 ... ``` Libosinfo database can be queried to extract additional information about the operating system using the short-id. Conditions allow filtering based on specific properties of an entity. For example, to get specific properties for Microsoft Windows Server 2012, use ``` $ osinfo-query os short-id=win2k12r2 Short ID | Name | Version | ID win2k12r2 | Microsoft Windows Server 2012 R2 | 6.3 | http://microsoft.com/win/2k12r2 ``` Additional properties that can be queried include : name, version, family, vendor, release-date, eol-date, codename, id. For more information please refer the osinfo-query man page. The libosinfo database of valid short-ids/URIs is customizable by the host admin or user/application by simply dropping new XML files into a defined location. This is useful in case there is a need for custom short-ids/URIs for custom derived distros, or have obscure embedded OS distros for example. While libosinfo provides a C library API, there is also support for applications just reading the XML files directly instead of a C library API binding to $PROGRAMMING-LANGUAGE. A Virtual Machine Preset representing an operating system with a ``kubevirt.io/os`` label could be applied on any given Virtual Machine that have and match the``kubevirt.io/os`` label.
Project: ArangoDB (App Definition and Development / Database)
File: all_narrow.md

+++ title = "`all_narrow`" description = "Policy class defining that hard undefined behaviour should occur on incorrect narrow and wide value, error or exception observation. Inherits publicly from `base`." +++ Policy class defining that hard undefined behaviour should occur on incorrect narrow and wide value, error or exception observation. Inherits publicly from {{% api "base" %}}, and simply defines its wide value, error and exception observer policies to call their corresponding narrow editions. Included by `<basicresult.hpp>`, and so is always available when `basicresult` is available. Requires: Nothing. Namespace: `BOOSTOUTCOMEV2_NAMESPACE::policy` Header: `<boost/outcome/policy/all_narrow.hpp>`
Project: KICS (Provisioning / Security & Compliance)
File: 2f652c42-619d-4361-b361-9f599688f8ca.md

title: HPA Targets Invalid Object hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 2f652c42-619d-4361-b361-9f599688f8ca Query name: HPA Targets Invalid Object Platform: Kubernetes Severity: <span style="color:#edd57e">Low</span> Category: Availability URL: The Horizontal Pod Autoscaler must target a valid object<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="12" apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: php-apache spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: php-apache minReplicas: 1 maxReplicas: 10 metrics: type: Object object: metric: name: requests-per-second target: type: Value value: 10k describedObject: apiVersion: networking.k8s.io/v1beta1 kind: Ingress ``` ```yaml title="Negative test num. 1 - yaml file" apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: php-apache spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: php-apache minReplicas: 1 maxReplicas: 10 metrics: type: Object object: metric: name: requests-per-second describedObject: apiVersion: networking.k8s.io/v1beta1 kind: Ingress name: main-route target: type: Value value: 10k ``` ```yaml title="Negative test num. 2 - yaml file" apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: matching-svc namespace: default spec: metrics: resource: name: cpu target: averageUtilization: 50 type: Utilization type: Resource minReplicas: 1 maxReplicas: 5 scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: matching-svc ```
Project: ClickHouse (App Definition and Development / Database)
File: v23.3.18.15-lts.md

sidebar_position: 1 sidebar_label: 2023 Backported in : There was a potential vulnerability in previous ClickHouse versions: if a user has connected and unsuccessfully tried to authenticate with the "interserver secret" method, the server didn't terminate the connection immediately but continued to receive and ignore the leftover packets from the client. While these packets are ignored, they are still parsed, and if they use a compression method with another known vulnerability, it will lead to exploitation of it without authentication. This issue was found with by https://twitter.com/malacupa. (). Backported in : There was an attempt to have the proper listing in , but the fix itself was in the wrong place, so it's still broken. See an . (). Fix buffer overflow in Gorilla codec (). Close interserver connection on any exception before authentication (). Fix pygithub (). Avoid dependencies with no fixed versions (). Tiny improvement security ().