cwielenb/CNCF-Dataset huggingface dataset:
Project: Beam (App Definition and Development / Streaming & Messaging)
File: flatmapelements.md

title: "FlatMapElements" <!-- 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. --> <table align="left"> <a target="_blank" class="button" href="https://beam.apache.org/releases/javadoc/current/index.html?org/apache/beam/sdk/transforms/FlatMapElements.html"> <img src="/images/logos/sdks/java.png" width="20px" height="20px" alt="Javadoc" /> Javadoc </a> </table> <br><br> Applies a simple 1-to-many mapping function over each element in the collection. The many elements are flattened into the resulting collection. {{< playground height="700px" >}} {{< playgroundsnippet language="java" path="SDKJAVAFlatMapElements" show="mainsection" >}} {{< /playground >}} is useful if the function is just deciding whether to output an element or not. is the most general element-wise mapping operation, and includes other abilities such as multiple output collections and side-inputs.
Project: Checkov (Provisioning / Security & Compliance)
File: AWS SAM.md

layout: default published: true title: AWS SAM configuration scanning nav_order: 20 Checkov supports the evaluation of policies on your SAM templates files. When using checkov to scan a directory that contains a SAM template it will validate if the file is compliant with AWS best practices such as having logging and auditing enabled, making sure S3 buckets are encrypted, HTTPS is being used, and more. Full list of SAM policies checks can be found . The SAM scanning is utilizing checks that are part of the Cloudformation scanning implementation of checkov since SAM resource definition extends the Cloudformation definition. ```yaml AWSTemplateFormatVersion: "2010-09-09" Transform: AWS::Serverless-2016-10-31 Resources: Enabled: Type: AWS::Serverless::Api Properties: StageName: prod TracingEnabled: true CacheClusterEnabled: true AccessLogSetting: DestinationArn: 'arn:aws:logs:us-east-1:123456789:log-group:my-log-group' Default: Type: AWS::Serverless::Api Properties: StageName: prod ``` ```bash checkov -d . --framework cloudformation ``` ```bash _| | _ | | / | '_ \ / _ \/ | |/ / _ \ \ / / | (| | | | / (| < (_) \ V / \_|_| |_|\|\|_|\_\/ \/ By Prisma Cloud | version: x.x.x cloudformation scan results: Passed checks: 3, Failed checks: 3, Skipped checks: 0 Check: CKVAWS120: "Ensure API Gateway caching is enabled" PASSED for resource: AWS::Serverless::Api.Enabled File: /sam.yaml:5-12 Check: CKVAWS73: "Ensure API Gateway has X-Ray Tracing enabled" PASSED for resource: AWS::Serverless::Api.Enabled File: /sam.yaml:5-12 Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-logging-policies/logging-15 Check: CKVAWS76: "Ensure API Gateway has Access Logging enabled" PASSED for resource: AWS::Serverless::Api.Enabled File: /sam.yaml:5-12 Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-logging-policies/logging-17 Check: CKVAWS120: "Ensure API Gateway caching is enabled" FAILED for resource: AWS::Serverless::Api.Default File: /sam.yaml:14-17 14 | Default: 15 | Type: AWS::Serverless::Api 16 | Properties: 17 | StageName: prod Check: CKVAWS73: "Ensure API Gateway has X-Ray Tracing enabled" FAILED for resource: AWS::Serverless::Api.Default File: /sam.yaml:14-17 Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-logging-policies/logging-15 14 | Default: 15 | Type: AWS::Serverless::Api 16 | Properties: 17 | StageName: prod Check: CKVAWS76: "Ensure API Gateway has Access Logging enabled" FAILED for resource: AWS::Serverless::Api.Default File: /sam.yaml:14-17 Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-logging-policies/logging-17 14 | Default: 15 | Type: AWS::Serverless::Api 16 | Properties: 17 | StageName: prod ```
Project: Beam (App Definition and Development / Streaming & Messaging)
File: Amazon.md

title: "Amazon" icon: /images/logos/powered-by/Amazon.png hasLink: "https://aws.amazon.com/kinesis/data-analytics/" <!-- 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: Kui (App Definition and Development / Application Definition & Image Build)
File: kui_shell_core.MetadataNamedResource.md

/ / MetadataNamedResource .MetadataNamedResource The name part of a metadata bearing resource. `MetadataNamedResource` `Optional` kind: `string` `Optional` metadata: `Object` | Name | Type | | :- | :- | | `creationTimestamp?` | `string` | | `generation?` | `string` | | `labels?` | `Record`<`string`, `string`\> | | `name` | `string` | | `namespace?` | `string` |
Project: KubeVirt (App Definition and Development / Application Definition & Image Build)
File: host-devices-and-device-plugins.md

KubeVirt provides a mechanism for assigning host devices to a virtual machine. This mechanism is generic and allows various types of PCI devices, such as GPU or any other devices attached to a PCI bus, to be assigned. It also allows Mediated devices, such as pre-configured virtual GPUs to be assigned using the same mechanism. NOTE: This document doesn't cover KubeVirt's . Administrators can control which host devices will be permitted for use in the cluster. Permitted host devices in the cluster will need to be listed in KubeVirt CR by its `vendor:product` selector for PCI devices or mediated device names ``` configuration: permittedHostDevices: pciHostDevices: pciVendorSelector: "10DE:1EB8" resourceName: "nvidia.com/TU104GLTeslaT4" pciVendorSelector: "8086:6F54" resourceName: "intel.com/qat" mediatedDevices: mdevNameSelector: "GRID T4-1Q" resourceName: "nvidia.com/GRID_T4-1Q" ``` KubeVirt provides integrated generic device plugins for the assignment of PCI and Mediated devices. These device plugins can discover, allocate and provide basic monitoring. Any host device that is bound to a VFIO driver and permitted for use in the cluster can be assigned to a virtual machine. KubeVirt can also assign host devices allocated by "external" device plugins, such as the NVIDIA GPU device plugin for KubeVirt. To assign the allocated devices to virtual machines, KubeVirt expects the device plugins to provide a list of allocated devices via an environment variables that encode the name of the resource with its relevant type. The prefixes are PCIRESOURCE for PCI devices and MDEVPCIRESOURCE_ for MDEVs. Here is an example of an expected naming of the variables: ``` PCIRESOURCENVIDIACOMTU104GLTeslaT4=PCIADDRESS1 ``` This encodes a PCI device with its resource name (provided in the KubeVirt CR) "nvidia.com/TU104GLTeslaT4" ``` PCIRESOURCEINTEL_QAT=PCIADDRESS2,PCIADDRESS3,... MDEVPCIRESOURCENVIDIACOMGRIDT4-1Q=UUID1,UUID2,UUID3,... ``` Both the internal and the external device plugins are expected to follow the same naming convention. HostDevices, as well as the existing GPUs field, will be able to reference both PCI and Mediated devices ``` kind: VirtualMachineInstance spec: domain: devices: gpus: deviceName: nvidia.com/TU104GLTeslaT4 name: gpu1 deviceName: nvidia.com/GRID_T4-1Q name: gpu2 hostDevices: deviceName: intel.com/qat name: quickaccess1 ```
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.6.57.md

layout: release date: 2023-02-25 tag: v0.6.57 language: en [urgent] Fix ever happening design-save retries loop @Abhishek-kumar09 (#7194) Thank you to our contributors for making this release possible: @Abhishek-kumar09 and @leecalcote
Project: KICS (Provisioning / Security & Compliance)
File: 76976de7-c7b1-4f64-a94f-90c1345914c2.md

title: ElastiCache Replication Group Not Encrypted At Rest hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 76976de7-c7b1-4f64-a94f-90c1345914c2 Query name: ElastiCache Replication Group Not Encrypted At Rest Platform: Terraform Severity: <span style="color:#bb2124">High</span> Category: Encryption URL: ElastiCache Replication Group encryption should be enabled at Rest<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "awselasticachereplication_group" "example" { automaticfailoverenabled = true availability_zones = ["us-west-2a", "us-west-2b"] replicationgroupid = "tf-rep-group-1" replicationgroupdescription = "test description" node_type = "cache.m4.large" numbercacheclusters = 2 port = 6379 } ``` ```tf title="Positive test num. 2 - tf file" hl_lines="9" resource "awselasticachereplication_group" "example2" { automaticfailoverenabled = true availability_zones = ["us-west-2a", "us-west-2b"] replicationgroupid = "tf-rep-group-1" replicationgroupdescription = "test description" node_type = "cache.m4.large" numbercacheclusters = 2 port = 6379 atrestencryption_enabled = false } ``` ```tf title="Negative test num. 1 - tf file" resource "awselasticachereplication_group" "example3" { automaticfailoverenabled = true availability_zones = ["us-west-2a", "us-west-2b"] replicationgroupid = "tf-rep-group-1" replicationgroupdescription = "test description" node_type = "cache.m4.large" numbercacheclusters = 2 port = 6379 atrestencryption_enabled = true } ```
Project: Meshery (Provisioning / Automation & Configuration)
File: aws-s3-controller.md

layout: integration title: AWS Simple Storage Service (S3) subtitle: Collaborative and visual infrastructure as code for AWS Simple Storage Service (S3) image: /assets/img/integrations/aws-s3-controller/icons/color/aws-s3-controller-color.svg permalink: extensibility/integrations/aws-s3-controller docURL: https://docs.meshery.io/extensibility/integrations/aws-s3-controller description: integrations-category: Cloud Native Storage integrations-subcategory: Storage registrant: GitHub components: name: field-export colorIcon: assets/img/integrations/aws-s3-controller/components/field-export/icons/color/field-export-color.svg whiteIcon: assets/img/integrations/aws-s3-controller/components/field-export/icons/white/field-export-white.svg description: name: adopted-resource colorIcon: assets/img/integrations/aws-s3-controller/components/adopted-resource/icons/color/adopted-resource-color.svg whiteIcon: assets/img/integrations/aws-s3-controller/components/adopted-resource/icons/white/adopted-resource-white.svg description: name: bucket colorIcon: assets/img/integrations/aws-s3-controller/components/bucket/icons/color/bucket-color.svg whiteIcon: assets/img/integrations/aws-s3-controller/components/bucket/icons/white/bucket-white.svg description: featureList: [ "Drag-n-drop cloud native infrastructure designer to configure, model, and deploy your workloads.", "Invite anyone to review and make changes to your private designs.", "Ongoing synchronization of Kubernetes configuration and changes across any number of clusters." ] howItWorks: "Collaborative Infrastructure as Code" howItWorksDetails: "Collaboratively manage infrastructure with your coworkers synchronously sharing the same designs." language: en list: include type: extensibility category: integrations
Project: Foreman (Provisioning / Automation & Configuration)
File: CONTRIBUTING.md

Before submitting a pull request, please verify that: The commit message is in the format "Fixes #12345 - Change description here". There are tests added to make sure the bug does not return/feature does not break in the future. Any strings are extracted for . For more information regarding contributions, plese read the and . Looking for a good starting issue to work on? have a look at: Developers, Need help installing Foreman? have a look at:
Project: KICS (Provisioning / Security & Compliance)
File: 17172bc2-56fb-4f17-916f-a014147706cd.md

title: Cluster Admin Rolebinding With Superuser Permissions hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 17172bc2-56fb-4f17-916f-a014147706cd Query name: Cluster Admin Rolebinding With Superuser Permissions Platform: Terraform Severity: <span style="color:#edd57e">Low</span> Category: Access Control URL: Ensure that the cluster-admin role is only used where required (RBAC)<br> ```tf title="Positive test num. 1 - tf file" hl_lines="8" resource "kubernetesclusterrole_binding" "example2" { metadata { name = "terraform-example2" } role_ref { api_group = "rbac.authorization.k8s.io" kind = "ClusterRole" name = "cluster-admin" } subject { kind = "User" name = "admin" api_group = "rbac.authorization.k8s.io" } subject { kind = "ServiceAccount" name = "default" namespace = "kube-system" } subject { kind = "Group" name = "system:masters" api_group = "rbac.authorization.k8s.io" } } ``` ```tf title="Negative test num. 1 - tf file" resource "kubernetesclusterrole_binding" "example1" { metadata { name = "terraform-example1" } role_ref { api_group = "rbac.authorization.k8s.io" kind = "ClusterRole" name = "cluster" } subject { kind = "User" name = "admin" api_group = "rbac.authorization.k8s.io" } subject { kind = "ServiceAccount" name = "default" namespace = "kube-system" } subject { kind = "Group" name = "system:masters" api_group = "rbac.authorization.k8s.io" } } ```
Project: KubeBlocks by ApeCloud (App Definition and Development / Database)
File: kbcli_class_create.md

title: kbcli class create Create a class ``` kbcli class create [NAME] [flags] ``` ``` kbcli class create custom-1c1g --cluster-definition apecloud-mysql --type mysql --cpu 1 --memory 1Gi kbcli class create --cluster-definition apecloud-mysql --type mysql --file ./classes.yaml ``` ``` --cluster-definition string Specify cluster definition, run "kbcli clusterdefinition list" to show all available cluster definitions --cpu string Specify component CPU cores --file string Specify file path of class definition YAML -h, --help help for create --memory string Specify component memory size --type string Specify component type ``` ``` --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 ``` - Manage classes
Project: Druid (App Definition and Development / Database)
File: time-min-max.md

id: time-min-max title: "Timestamp Min/Max aggregators" <!-- ~ 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. --> To use this Apache Druid extension, `druid-time-min-max` in the extensions load list. These aggregators enable more precise calculation of min and max time of given events than `time` column whose granularity is sparse, the same as query granularity. To use this feature, a "timeMin" or "timeMax" aggregator must be included at indexing time. They can apply to any columns that can be converted to timestamp, which include Long, DateTime, Timestamp, and String types. For example, when a data set consists of timestamp, dimension, and metric value like followings. ``` 2015-07-28T01:00:00.000Z A 1 2015-07-28T02:00:00.000Z A 1 2015-07-28T03:00:00.000Z A 1 2015-07-28T04:00:00.000Z B 1 2015-07-28T05:00:00.000Z A 1 2015-07-28T06:00:00.000Z B 1 2015-07-29T01:00:00.000Z C 1 2015-07-29T02:00:00.000Z C 1 2015-07-29T03:00:00.000Z A 1 2015-07-29T04:00:00.000Z A 1 ``` At ingestion time, timeMin and timeMax aggregator can be included as other aggregators. ```json { "type": "timeMin", "name": "tmin", "fieldName": "<field_name, typically column specified in timestamp spec>" } ``` ```json { "type": "timeMax", "name": "tmax", "fieldName": "<field_name, typically column specified in timestamp spec>" } ``` `name` is output name of aggregator and can be any string. `fieldName` is typically column specified in timestamp spec but can be any column that can be converted to timestamp. To query for results, the same aggregators "timeMin" and "timeMax" is used. ```json { "queryType": "groupBy", "dataSource": "timeMinMax", "granularity": "DAY", "dimensions": ["product"], "aggregations": [ { "type": "count", "name": "count" }, { "type": "timeMin", "name": "<output_name of timeMin>", "fieldName": "tmin" }, { "type": "timeMax", "name": "<output_name of timeMax>", "fieldName": "tmax" } ], "intervals": [ "2010-01-01T00:00:00.000Z/2020-01-01T00:00:00.000Z" ] } ``` Then, result has min and max of timestamp, which is finer than query granularity. ``` 2015-07-28T00:00:00.000Z A 4 2015-07-28T01:00:00.000Z 2015-07-28T05:00:00.000Z 2015-07-28T00:00:00.000Z B 2 2015-07-28T04:00:00.000Z 2015-07-28T06:00:00.000Z 2015-07-29T00:00:00.000Z A 2 2015-07-29T03:00:00.000Z 2015-07-29T04:00:00.000Z 2015-07-29T00:00:00.000Z C 2 2015-07-29T01:00:00.000Z 2015-07-29T02:00:00.000Z ```
Project: YDB (App Definition and Development / Database)
File: optional_ops.md

`Just()`: Change the value's data type to from the current data type (i.e.,`T` is converted to `T?`). The reverse operation is . Examples ```yql SELECT Just("my_string"); -- String? ``` `Unwrap()`: Converting the value of the data type to the relevant non-optional type, raising a runtime error if the data is `NULL`. This means that `T?` becomes `T`. If the value isn't , then the function returns its first argument unchanged. Arguments: Value to be converted. An optional string with a comment for the error text. Reverse operation is . Examples ```yql $value = Just("value"); SELECT Unwrap($value, "Unexpected NULL for $value"); ``` `Nothing()`: Create an empty value for the specified data type. Examples ```yql SELECT Nothing(String?); -- an empty (NULL) value with the String? type ``` .
Project: ArangoDB (App Definition and Development / Database)
File: outcome_operator_out.md

+++ title = "`std::ostream &operator<<(std::ostream &, const basic_outcome<T, EC, EP, NoValuePolicy> &)`" description = "Serialises a `basic_outcome` to a `std::ostream`." +++ Serialises a `basic_outcome` to a `std::ostream`. Serialisation format is: ``` <unsigned int flags><space><valuetype if set and not void><errortype if set and not void><exception_type if set and not void> ``` This is the wrong function to use if you wish to print human readable output. Use {{% api "std::string print(const basic_outcome<T, EC, EP, NoValuePolicy> &)" %}} instead. Overridable: Not overridable. Requires: That `operator<<` is a valid expression for `std::ostream` and `T`, `EC` and `EP`. Namespace: `BOOSTOUTCOMEV2_NAMESPACE` Header: `<boost/outcome/iostream_support.hpp>` (must be explicitly included manually).
Project: KICS (Provisioning / Security & Compliance)
File: 4b410d24-1cbe-4430-a632-62c9a931cf1c.md

title: Curl or Wget Instead of Add hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 4b410d24-1cbe-4430-a632-62c9a931cf1c Query name: Curl or Wget Instead of Add Platform: Dockerfile Severity: <span style="color:#edd57e">Low</span> Category: Best Practices URL: Use of Curl or Wget should be done instead of Add to fetch packages from remote URLs due to the use of Add being strongly discouraged<br> ```dockerfile title="Positive test num. 1 - dockerfile file" hl_lines="3" FROM openjdk:10-jdk VOLUME /tmp ADD https://example.com/big.tar.xz /usr/src/things/ RUN tar -xJf /usr/src/things/big.tar.xz -C /usr/src/things RUN make -C /usr/src/things all ``` ```dockerfile title="Negative test num. 1 - dockerfile file" FROM openjdk:10-jdk RUN mkdir -p /usr/src/things \ && curl -SL https://example.com/big.tar.xz \ | tar -xJC /usr/src/things \ && make -C /usr/src/things all ``` ```dockerfile title="Negative test num. 2 - dockerfile file" FROM openjdk:10-jdk ADD ./drop-http-proxy-header.conf /etc/apache2/conf-available RUN mkdir -p /usr/src/things \ && curl -SL https://example.com/big.tar.xz \ | tar -xJC /usr/src/things \ && make -C /usr/src/things all ```