cwielenb/CNCF-Dataset huggingface dataset:
Project: KICS (Provisioning / Security & Compliance)
File: 6452c424-1d92-4deb-bb18-a03e95d579c4.md

title: Yum install Without Version hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 6452c424-1d92-4deb-bb18-a03e95d579c4 Query name: Yum install Without Version Platform: Dockerfile Severity: <span style="color:#ff7213">Medium</span> Category: Supply-Chain URL: Not specifying the package version can cause failures due to unanticipated changes in required packages<br> ```dockerfile title="Positive test num. 1 - dockerfile file" hl_lines="2 3" FROM opensuse/leap:15.2 RUN yum install -y httpd && yum clean all RUN ["yum", "install", "httpd"] HEALTHCHECK CMD curl --fail http://localhost:3000 || exit 1 ``` ```dockerfile title="Negative test num. 1 - dockerfile file" FROM opensuse/leap:15.2 RUN yum install -y httpd-2.24.2 && yum clean all HEALTHCHECK CMD curl --fail http://localhost:3000 || exit 1 FROM opensuse/leap:15.3 ENV RETHINKDBPACKAGEVERSION 2.4.0~0trusty RUN yum install -y rethinkdb-$RETHINKDBPACKAGEVERSION && yum clean all ```
Project: Flink (App Definition and Development / Streaming & Messaging)
File: set.md

title: "SET Statements" weight: 14 type: docs aliases: /dev/table/sql/set.html <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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. --> `SET` statements are used to modify the configuration or list the configuration. {{< tabs "set statement" >}} {{< tab "SQL CLI" >}} `SET` statements can be executed in . The following examples show how to run a `SET` statement in SQL CLI. {{< /tab >}} {{< /tabs >}} {{< tabs "set" >}} {{< tab "SQL CLI" >}} ```sql Flink SQL> SET 'table.local-time-zone' = 'Europe/Berlin'; [INFO] Session property has been set. Flink SQL> SET; 'table.local-time-zone' = 'Europe/Berlin' ``` {{< /tab >}} {{< /tabs >}} ```sql SET ('key' = 'value')? ``` If no key and value are specified, it just prints all the properties. Otherwise, set the key with specified value. {{< top >}}
Project: Beam (App Definition and Development / Streaming & Messaging)
File: bigdatainstitute.md

title: "Big Data Institute" icon: /images/logos/powered-by/bigdatainstitute.png hasLink: "https://www.infoq.com/br/presentations/how-apache-beam-will-change-big-data/" <!-- 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. -->
Project: YugabyteDB (App Definition and Development / Database)
File: 06-fetch.md

title: "FETCH" In this exercise we'll query the customers table and order the results by company\name_ in ascending order, while limiting the rows returned to 7. ``` SELECT customer_id, company_name, contact_name, contact_title FROM customers ORDER BY company_name ASC FETCH NEXT 7 ROWS ONLY; ``` This query should return 7 rows. In this exercise we'll query the customers table and order the results by company\name_ in ascending order, while limiting the rows returned to the 7 that come after the first 2. ``` SELECT customer_id, company_name, contact_name, contact_title FROM customers ORDER BY company_name ASC OFFSET 2 FETCH NEXT 7 ROWS ONLY; ``` This query should return 7 rows.
Project: YugabyteDB (App Definition and Development / Database)
File: func_nextval.md

title: nextval() function [YSQL] headerTitle: nextval() linkTitle: nextval() description: Returns the next value from the sequence cache for the current session. menu: v2.18: identifier: api-ysql-exprs-nextval parent: api-ysql-exprs type: docs Use the `nextval( sequence_name )` function to return the next value from the sequence cache for the current session. If no more values are available in the cache, the session allocates a block of numbers for the cache and returns the first one. The number of elements allocated is determined by the `cache` option specified as part of the `CREATE SEQUENCE` statement. Specify the name of the sequence. An error is raised if a sequence reaches its minimum or maximum value. If is set to `server`, sequence values are cached on the YB-TServer, to be shared with all connections on that YB-TServer. This is beneficial when many connections on the server are expected to get the next value of a sequence. Normally, each connection waits for replication to complete, which can be expensive, especially in a multi-region cluster. With the server cache method, only one connection waits for RAFT replication and the rest retrieve values from the same cached range. When the server cache method is used, the connection cache size is implicitly set to 1. When the cache method is changed from `connection` to `server`, sequences continue to use the connection cache until it is exhausted, at which point they begin using the server cache. When the cache method is changed from `server` to `connection`, sequences immediately begin using a connection cache. The server cache is not cleared in this case, and its values can later be retrieved if the cache method is again set to `server`. Limitations Calling `setval` on a sequence or restarting a sequence is not currently compatible with server caching, as the cache will not be cleared. This issue is tracked in GitHub issue . Bidirectional xCluster replication and point-in-time-restore are not compatible with sequences and therefore are not compatible with this feature. ```plpgsql yugabyte=# CREATE SEQUENCE s; ``` ```output CREATE SEQUENCE ``` Call nextval() a couple of times. ```plpgsql yugabyte=# SELECT nextval('s'); ``` ```output nextval 1 (1 row) ``` ```plpgsql yugabyte=# SELECT nextval('s'); ``` ```output nextval 2 (1 row) ``` ```plpgsql yugabyte=# CREATE SEQUENCE s2 CACHE 3; ``` ```output CREATE SEQUENCE ``` In the same session, call `nextval()`. The first time it's called, the session's cache will allocate numbers 1, 2, and 3. This means that the data for this sequence will have its `last_val` set to 3. This modification requires two RPC requests. ```plpgsql SELECT nextval('s2'); ``` ```output nextval 1 (1 row) ``` The next call of `nextval()` in the same session will not generate new numbers for the sequence, so it is much faster than the first `nextval()` call because it will just use the next value available from the cache. ```plpgsql SELECT nextval('s2'); ``` ```output nextval 2 (1 row) ```
Project: KICS (Provisioning / Security & Compliance)
File: 89afe3f0-4681-4ce3-89ed-896cebd4277c.md

title: PostgreSQL log_checkpoints Flag Not Set To ON hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 89afe3f0-4681-4ce3-89ed-896cebd4277c Query name: PostgreSQL log_checkpoints Flag Not Set To ON Platform: Ansible Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: PostgreSQL database instance should have a 'log_checkpoints' flag with its value set to 'on'<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="16 5" name: create instance google.cloud.gcpsqlinstance: name: GCP instance settings: databaseFlags: name: log_checkpoints value: off tier: db-n1-standard-1 region: us-central1 project: test_project databaseversion: POSTGRES9_6 auth_kind: serviceaccount serviceaccountfile: "/tmp/auth.pem" state: present name: create another instance google.cloud.gcpsqlinstance: name: GCP instance 2 settings: tier: db-n1-standard-1 region: us-central1 project: test_project databaseversion: POSTGRES9_6 auth_kind: serviceaccount serviceaccountfile: "/tmp/auth.pem" state: present ``` ```yaml title="Negative test num. 1 - yaml file" name: create a instance google.cloud.gcpsqlinstance: name: GCP instance settings: databaseFlags: name: log_checkpoints value: on tier: db-n1-standard-1 region: us-central1 project: test_project databaseversion: POSTGRES9_6 auth_kind: serviceaccount serviceaccountfile: /tmp/auth.pem state: present ```
Project: KubeDB by AppsCode (App Definition and Development / Database)
File: README.md

title: Setup | KubeDB description: Setup guides for KubeDB by AppsCode menu: docs_{{ .version }}: identifier: setup-readme name: Readme parent: setup weight: -1 product_name: kubedb menuname: docs{{ .version }} sectionmenuid: setup url: /docs/{{ .version }}/setup/ aliases: /docs/{{ .version }}/setup/README/ <div style="text-align: center;"> <a class="button is-info is-medium is-active has-text-weight-normal" href="/docs/setup/install/kubedb.md" style="background:#FC6011; width: 18rem;">Install KubeDB</a> </div> <br> The setup section contains instructions for installing the KubeDB and its various components in Kubernetes. This section has been divided into the following sub-sections: Install KubeDB: Installation instructions for KubeDB and its various components. : Installation instructions for KubeDB. : Installation instructions for KubeDB `kubectl` plugin. : Troubleshooting guide for various installation problems. Uninstall KubeDB: Uninstallation instructions for KubeDB and its various components. : Uninstallation instructions for KubeDB. : Uninstallation instructions for KubeDB `kubectl` plugin. : Instruction for updating KubeDB license and upgrading between various KubeDB versions.
Project: KICS (Provisioning / Security & Compliance)
File: daa581ef-731c-4121-832d-cf078f67759d.md

title: EC2 Instance Monitoring Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: daa581ef-731c-4121-832d-cf078f67759d Query name: EC2 Instance Monitoring Disabled Platform: Pulumi Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: EC2 Instance should have detailed monitoring enabled. With detailed monitoring enabled data is available in 1-minute periods<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="16 7" name: aws-eks runtime: yaml description: An EKS cluster resources: example: type: aws:ec2:Instance properties: name: aws-eks runtime: yaml description: An EKS cluster resources: example: type: aws:ec2:Instance properties: monitoring: false ``` ```yaml title="Negative test num. 1 - yaml file" name: aws-eks runtime: yaml description: An EKS cluster resources: example: type: aws:ec2:Instance properties: monitoring: true ```
Project: KICS (Provisioning / Security & Compliance)
File: 23e1f5f0-12b7-4d7e-9087-f60f42ccd514.md

title: Indefinitely Databricks OBO Token Lifetime hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 23e1f5f0-12b7-4d7e-9087-f60f42ccd514 Query name: Indefinitely Databricks OBO Token Lifetime Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Insecure Defaults URL: OBO Token has an indefinitely lifetime<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "databricksobotoken" "positive" { dependson = [databricksgroup_member.this] applicationid = databricksserviceprincipal.this.applicationid comment = "PAT on behalf of ${databricksserviceprincipal.this.display_name}" } ``` ```tf title="Negative test num. 1 - tf file" resource "databricksobotoken" "negative" { dependson = [databricksgroup_member.this] applicationid = databricksserviceprincipal.this.applicationid comment = "PAT on behalf of ${databricksserviceprincipal.this.display_name}" lifetime_seconds = 3600 } ```
Project: Checkov (Provisioning / Security & Compliance)
File: Implementing CI Metadata Extractor.md

CI/CD jobs have environment variables that can enrich the execution context. Attributes like: Author of the run Commit sha Pull request ID Link to the host running the CI Those attributes can be added by reading environment variables published on the public docs of CI/CD vendors. Examples: https://docs.gitlab.com/ee/ci/variables/predefined_variables.html https://docs.github.com/en/actions/learn-github-actions/environment-variables You'll need to implement a new class derived from RunMetaDataExtractor and commit it into the directory `checkov/common/bridgecrew/run_metadata/extractors`. Example: ```python import os from checkov.common.bridgecrew.runmetadata.abstractrunmetadataextractor import RunMetaDataExtractor class GithubActionsRunMetadataExtractor(RunMetaDataExtractor): def iscurrentci(self): if os.getenv("GITHUB_ACTIONS", ""): return True return False def init(self): serverurl = os.getenv('GITHUBSERVER_URL', '') frombranch = os.getenv('GITBRANCH', "master") tobranch = os.getenv('GITHUBBASE_REF', "") prid = os.getenv("$GITHUBREF", "//").split("/") repository = os.getenv('GITHUB_REPOSITORY', "") prurl = f"{serverurl}/{repository}/pull/{pr_id}" commithash = os.getenv("GITHUBSHA", "") commiturl = f"{serverurl}/{repository}/commit/${commit_hash}" authorname = os.getenv("GITHUBACTOR", "") authorurl = f"{serverurl}/{author_name}" runid = os.getenv("GITHUBRUN_NUMBER", "") runurl = f"{serverurl}/{repository}/actions/runs/{run_id}" repositoryurl = f"{serverurl}/{repository}" super().init(frombranch=frombranch, tobranch=tobranch, prid=prid, prurl=prurl, commithash=commithash, commiturl=commiturl, authorname=authorname, authorurl=authorurl, runid=runid, runurl=runurl, repositoryurl=repositoryurl) extractor = GithubActionsRunMetadataExtractor() ```
Project: ClickHouse (App Definition and Development / Database)
File: how-do-i-contribute-code-to-clickhouse.md

slug: /ru/faq/general/how-do-i-contribute-code-to-clickhouse title: How do I contribute code to ClickHouse? sidebar_position: 120 ClickHouse is an open-source project . As customary, contribution instructions are published in file in the root of the source code repository. If you want to suggest a substantial change to ClickHouse, consider explaining what you want to do, to discuss it with maintainers and community first. . If your contributions are security related, please check out too.
Project: CockroachDB (App Definition and Development / Database)
File: 20230531_query_sst_metrics.md

Feature Name: sstable_metrics Status: draft Start Date: 2023-05-31 Authors: Rahul Aggarwal Cockroach Issue: https://github.com/cockroachdb/cockroach/issues/102604 Storage Team engineers are often involved in support escalations from customers that require inspection of SSTable-level statistics. Currently, these statistics are difficult to obtain and require work from the customer and support teams to find appropriate files to pull from the filesystem to send to us. As a result, this RFC outlines how we will add the ability for operators to query sstable metrics which is useful for debugging storage issues pertaining to a specific key range. This will be implemented using a set-generating function (SRF) and used as follows. ```SELECT * FROM crdbinternal.sstablemetrics('start-key', 'end-key')``` or ```SELECT * FROM crdbinternal.sstablemetrics(node-id, store-id, 'start-key', 'end-key')``` Audience: CockroachDB team members The proposed solution is creating a new SRF which will be added to the existing [built-in generators](https://github.com/cockroachdb/cockroach/blob/3526c9ca65a94bd751b23a65b3c96a1513c961bc/pkg/sql/sem/builtins/generator_builtins.go#L107). This SRF will have two overloads (for the two variants above). The latter one only talks to one node, while the other will need to send an RPC to each node in order to retrieve all the relevant SSTables. This can be achieved by calling for each separate node inside of a function that is part of `evalCtx`. This function will call out to the and be handled in the [stores server](https://github.com/cockroachdb/cockroach/blob/5b6302b2ed2a83f49b55329ce3cac5f6135d0aea/pkg/kv/kvserver/stores_server.go#L24) (see Pebble side). The SRF will be structured similar to i.e. using a generator to return each output row. Columns to display: node_id store_id level file_num metrics Inside the store's server code is where Pebble will be used, specifically . When calling `DB.SSTables` we will need to specify a `SSTableOption` which will be a function allowing us to filter SSTables for the key range specified by the user. Note that filtering can be performed based on the `FileMetadata` alone, which allows us to skip unnecessary `getTableProperties` calls (which can read metadata from storage and affect caches). Define the required functions with dummy implementations Create the new SSTableOption that filters by key ranges Implement the generator function for single node queries Add logic to support multiple node queries Audience: all participants to the RFC review. How will we get a list of all the nodes we will need to send an RPC request? One option is to only support global keys in the variant in which the user does not specify a specific node.
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-ref-functions-udf-scalar.md

layout: global title: Scalar User Defined Functions (UDFs) displayTitle: Scalar User Defined Functions (UDFs) license: | Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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. User-Defined Functions (UDFs) are user-programmable routines that act on one row. This documentation lists the classes that are required for creating and registering UDFs. It also contains examples that demonstrate how to define and register UDFs and invoke them in Spark SQL. To define the properties of a user-defined function, the user can use some of the methods defined in this class. asNonNullable(): UserDefinedFunction* Updates UserDefinedFunction to non-nullable. asNondeterministic(): UserDefinedFunction* Updates UserDefinedFunction to nondeterministic. withName(name: String): UserDefinedFunction* Updates UserDefinedFunction with a given name. <div class="codetabs"> <div data-lang="scala" markdown="1"> {% includeexample udfscalar scala/org/apache/spark/examples/sql/UserDefinedScalar.scala%} </div> <div data-lang="java" markdown="1"> {% includeexample udfscalar java/org/apache/spark/examples/sql/JavaUserDefinedScalar.java%} </div> </div>
Project: EJBCA Community (Provisioning / Security & Compliance)
File: SECURITY.md

If you think that you have found a security vulnerability, please report it to this email address: Describe the issue including all details, for example: Short summary of the problem Steps to reproduce Affected product versions Logs if available The Keyfactor team will send a response indicating the next steps in handling your report. You may be asked to provide additional information or guidance. If the issue is confirmed as a vulnerability, we will open a Security Advisory and acknowledge your contributions as part of it. Optionally, you can have your name and contact information listed on the page.
Project: KubeVirt (App Definition and Development / Application Definition & Image Build)
File: docs_report.md

name: Docs Report about: Report an issue in KubeVirt's documentation title: '' labels: '' assignees: '' <!-- Make sure that you visit our User Guide at https://kubevirt.io/user-guide. --> Description: A clear and concise description of what the issue is. What you expected: A clear and concise description of what you expected. URL: Provide a link to the documentation. Additional context: Add any other context about the issue here.
Project: Meshery (Provisioning / Automation & Configuration)
File: mesheryctl_feature.md

name: mesheryctl Feature Request about: Request an enhancement in Meshery's CLI title: '[mesheryctl]' labels: component/mesheryctl, language/go, kind/enhancement assignees: '' <!-- Please update the mesheryctl Command Tracker spreadsheet --> See for current status of commands. <!-- A brief description of what the problem is. (e.g. I need to be able to...) --> <!-- A brief description of the enhancement. --> <!-- Specifics on the approach to fulfilling the feature request. --> <!-- Stipulations of functional behavior or non-functional items that must be in-place in order for the issue to be closed. --> <!-- Any visual diagrams of the desired user interface. --> Questions: and
Project: Ansible (Provisioning / Automation & Configuration)
File: question_not_bug.md

Hi! Thanks very much for your interest in Ansible. It means a lot to us. This appears to be a user question, and we'd like to direct these kinds of things to either the mailing list or the IRC channel. IRC: #ansible on mailing list: <https://groups.google.com/forum/#!forum/ansible-project> See this page for a complete and up to date list of communication channels and their purposes: <https://docs.ansible.com/ansible/latest/community/communication.html> Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. If don't you think this particular issue is resolved, you should still stop by there first, we'd appreciate it. This allows us to keep the issue tracker for bugs, pull requests, RFEs and the like. Thank you once again and we look forward to seeing you on the list or IRC. Thanks!