cwielenb/CNCF-Dataset huggingface dataset:
Project: KICS (Provisioning / Security & Compliance)
File: 6107c530-7178-464a-88bc-df9cdd364ac8.md

title: OSS Bucket Ip Restriction Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 6107c530-7178-464a-88bc-df9cdd364ac8 Query name: OSS Bucket Ip Restriction Disabled Platform: Terraform Severity: <span style="color:#bb2124">High</span> Category: Networking and Firewall URL: OSS Bucket should have ip restricted access<br> ```tf title="Positive test num. 1 - tf file" hl_lines="5" resource "alicloudossbucket" "bucket-policy" { bucket = "bucket-170309-policy" acl = "private" policy = <<POLICY {"Statement": [{"Action": ["oss:PutObject", "oss:GetObject", "oss:DeleteBucket"], "Effect":"Allow", "Resource": ["acs:oss:::*"]}], "Version":"1"} POLICY } ``` ```tf title="Negative test num. 1 - tf file" resource "alicloudossbucket" "bucket-securetransport2"{ policy = <<POLICY { "Version": "1", "Statement": [ { "Effect": "Deny", "Action": [ "oss:RestoreObject", "oss:ListObjects", "oss:AbortMultipartUpload", "oss:PutObjectAcl", "oss:GetObjectAcl", "oss:ListParts", "oss:DeleteObject", "oss:PutObject", "oss:GetObject", "oss:GetVodPlaylist", "oss:PostVodPlaylist", "oss:PublishRtmpStream", "oss:ListObjectVersions", "oss:GetObjectVersion", "oss:GetObjectVersionAcl", "oss:RestoreObjectVersion" ], "Principal": [ "*" ], "Resource": [ "acs:oss::0000111122223334:af/" ], "Condition": { "IpAdress": { "acs:SourceIp": "10.0.0.0" } } } ] } POLICY } ``` ```tf title="Negative test num. 2 - tf file" resource "alicloudossbucket" "bucket-securetransport2"{ policy = <<POLICY { "Version": "1", "Statement": [ { "Effect": "Deny", "Action": [ "oss:RestoreObject", "oss:ListObjects", "oss:AbortMultipartUpload", "oss:PutObjectAcl", "oss:GetObjectAcl", "oss:ListParts", "oss:DeleteObject", "oss:PutObject", "oss:GetObject", "oss:GetVodPlaylist", "oss:PostVodPlaylist", "oss:PublishRtmpStream", "oss:ListObjectVersions", "oss:GetObjectVersion", "oss:GetObjectVersionAcl", "oss:RestoreObjectVersion" ], "Principal": [ "*" ], "Resource": [ "acs:oss::0000111122223334:af/" ], "Condition": { "NotIpAdress": { "acs:SourceIp": "10.0.0.0" } } } ] } POLICY } ```
Project: NATS (App Definition and Development / Streaming & Messaging)
File: pkcs12.md

Refresh PKCS12 files when test certificates and keys (PEM files) are refreshed (e.g. expiry workflow) `client.p12` is a p12/pfx packaging of `client.pem` and `client-key.pem` `openssl pkcs12 -export -inkey ./client-key.pem -in ./client.pem -out client.p12` To add the CA, use the following: `openssl pkcs12 -export -nokeys -in ..\ca.pem -out ca.p12` Note: set the PKCS12 bundle password to `s3cr3t` as required by provisioning scripts Windows cert store supports p12/pfx bundle for certificate-with-key import. Windows cert store tests will execute a Powershell script to import relevant PKCS12 bundle into the Windows store before the test. Equivalent to: `powershell.exe -command "& '..\test\configs\certs\tlsauth\certstore\import-<client,server>-p12.ps1'"` The `delete-cert-from-store.ps1` script deletes imported certificates from the Windows store (if present) that can cause side-effects and impact the validity of different use tests. Note: Tests are configured for "current user" store context. Execute tests with appropriate Windows permissions (e.g. as Admin) if adding tests with "local machine" store context specified.
Project: Beam (App Definition and Development / Streaming & Messaging)
File: yaml_errors.md

<!-- 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. --> The contents of this file have been moved to the main Beam site at https://beam.apache.org/documentation/sdks/yaml-errors/
Project: SPIRE (Provisioning / Key Management)
File: plugin_agent_nodeattestor_gcp_iit.md

Must be used in conjunction with the server-side gcp_iit plugin The `gcp_iit` plugin automatically attests instances using the . It also allows an operator to use GCP Instance IDs when defining SPIFFE ID attestation policies. | Configuration | Description | Default | ||--|-| | identitytokenhost | Host where an can be retrieved from | `metadata.google.internal` | | service_account | The service account to fetch an identity token from | `default` | A sample configuration: ```hcl NodeAttestor "gcp_iit" { plugin_data { identitytokenhost = "metadata.google.internal" service_account = "XXX@developer.gserviceaccount.com" } } ```
Project: Meshery (Provisioning / Automation & Configuration)
File: 02-14-2023-13-48-02_75fc4b02.md

timestamp: "2023-02-14 13:47:50 UTC Tue" meshery-component: meshery-consul meshery-component-version: v0.6.7 meshery-server-version: "v0.6.51" k8s-distro: minikube k8s-version: "v1.25.3" service-mesh: Consul service-mesh-version: "v1.0.4" tests: consul-client: null consul-server: null overall-status: "failing"
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-error-conditions-invalid-datetime-pattern-error-class.md

layout: global title: INVALIDDATETIMEPATTERN error class displayTitle: INVALIDDATETIMEPATTERN error class 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. <!-- DO NOT EDIT THIS FILE. It was generated automatically by `org.apache.spark.SparkThrowableSuite`. --> Unrecognized datetime pattern: `<pattern>`. This error class has the following derived error classes: Illegal pattern character found in datetime pattern: `<c>`. Please provide legal character. Too many letters in datetime pattern: `<pattern>`. Please reduce pattern length.
Project: Meshery (Provisioning / Automation & Configuration)
File: 1.11.2.md

component: 1.11.2 integrations: consulmesh.meshery consulmesh_definition.json exportedservices.meshery exportedservices.meshery ingressgateway.meshery ingressgateway.meshery mesh.meshery mesh.meshery proxydefaults.meshery proxydefaults.meshery servicedefaults.meshery servicedefaults.meshery serviceintentions.meshery serviceintentions.meshery serviceresolver.meshery serviceresolver.meshery servicerouter.meshery servicerouter.meshery servicesplitter.meshery servicesplitter.meshery terminatinggateway.meshery terminatinggateway.meshery
Project: Chef InSpec (Provisioning / Security & Compliance)
File: mail_alias.md

+++ title = "mail_alias resource" draft = false gh_repo = "inspec" platform = "unix" [menu] [menu.inspec] title = "mail_alias" identifier = "inspec/resources/os/mailalias.md mailalias resource" parent = "inspec/resources/os" +++ Use the `mail_alias` Chef InSpec audit resource to test the mail alias present in the aliases file. This resource is distributed along with Chef InSpec. A `mail_alias` Chef InSpec audit resource allows testing the mail alias present in the aliases file. ```ruby describe mail_alias("daemon") do it { should bealiasedto "root" } end ``` where `'daemon'` is an alias present in `/etc/aliases` of the target system `'root'` is the value assigned to the alias `bealiasedto` is a matcher of this resource For a full list of available matchers, please visit the . The specific matchers of this resource is: `bealiasedto`. The `bealiasedto` matcher tests if the input value is assigned to the initialized alias. ```ruby it { should bealiasedto "root" } ``` The following examples show how to use this Chef InSpec audit resource. ```ruby describe mail_alias("daemon") do it { should bealiasedto "root" } end ``` ```ruby describe mail_alias("mailadmin") do it { should bealiasedto "inspecadmin@chef.io" } it { should bealiasedto "chefadmin@chef.io" } end ```
Project: Podman (App Definition and Development / Application Definition & Image Build)
File: env-merge.md

Preprocess default environment variables for the containers. For example if image contains environment variable `hello=world` user can preprocess it using `--env-merge hello=${hello}-some` so new value is `hello=world-some`. Please note that if the environment variable `hello` is not present in the image, then it'll be replaced by an empty string and so using `--env-merge hello=${hello}-some` would result in the new value of `hello=-some`, notice the leading `-` delimiter.
Project: Beam (App Definition and Development / Streaming & Messaging)
File: reshuffle.md

title: "Reshuffle" <!-- 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/pydoc/current/apachebeam.transforms.util.html?highlight=reshuffle#apachebeam.transforms.util.Reshuffle"> <img src="/images/logos/sdks/python.png" width="20px" height="20px" alt="Pydoc" /> Pydoc </a> </table> <br><br> Adds a temporary random key to each element in a collection, reshuffles these keys, and removes the temporary key. This redistributes the elements between workers and returns a collection equivalent to its input collection. This is most useful for adjusting parallelism or preventing coupled failures. See for updates. N/A
Project: KubeMQ (App Definition and Development / Streaming & Messaging)
File: kubemq_events_store.md

Execute Kubemq 'Events-Store' Pub/Sub commands Execute Kubemq 'Events-Store' Pub/Sub commands ``` kubemq events_store [flags] ``` ``` kubemq events_store send kubemq events_store receive kubemq events_store attach kubemq events_store list ``` ``` -h, --help help for events_store ``` - - Events-Store attach to events store channels command - Events-Store list of 'events store' channels - Events-Store receive a messages from an 'events store' - Events-Store send messages to an 'events store' channel command
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.6.0-rc-2.md

layout: release date: 2021-12-06 tag: v0.6.0-rc-2 language: en Fixes possible panic in pattern validation @Revolyssup (#4725) [Contributing.md] Fixed broken link @arunkarthicknm (#4723) [Chore] Patterns: Swap dryrun with verify action on deploy endpoint @leecalcote (#4682) Fixed nil error causing panic @Revolyssup (#4688) Metadata for handling comp @Revolyssup (#4661) [meshery] Fetch single SMI Result from both providers @piyushsingariya (#4678) Run tests under same performance profile if it is already present @navendu-pottekkat (#4710) [chore] minor update in error @piyushsingariya (#4680) Fix broken UI build @utkarsh-pro (#4716) Navigator Chevron Cursor Fix @sahilsuman933 (#4713) [Extension] Dependency injection resolver and fix meshsync event subscription resolver @bariqhibat (#4706) refractor: add enum for file operations among patterns, filters and apps @Abhishek-kumar09 (#4375) [UI] Navigator style bug fix @Chadha93 (#4708) Bump tar from 6.1.9 to 6.1.11 in /ui @dependabot (#4699) Bump graphql from 15.5.1 to 15.7.2 in /ui @dependabot (#4695) Avoid throwing seeding errors when meshery is run locally @Revolyssup (#4624) [meshery-ui_bug.md] Fixed broken link @arunkarthicknm (#4720) Bump tar from 6.1.9 to 6.1.11 in /ui @dependabot (#4699) Bump graphql from 15.5.1 to 15.7.2 in /ui @dependabot (#4695) Added provider option in adapter's core workflow @Revolyssup (#4687) Shubham tyagi/feature update spanish home and pages @shubham-tyagi (#4651) Run tests under same performance profile if it is already present @navendu-pottekkat (#4710) Added provider option in adapter's core workflow @Revolyssup (#4687) Broken URL FIX @sahilsuman933 (#4686) Thank you to our contributors for making this release possible: @Abhishek-kumar09, @Chadha93, @DelusionalOptimist, @Revolyssup, @arunkarthicknm, @bariqhibat, @dependabot, @dependabot[bot], @leecalcote, @navendu-pottekkat, @piyushsingariya, @sahilsuman933, @shubham-tyagi, @sudo-NithishKarthik, @utkarsh-pro and @warunicorn19
Project: YDB (App Definition and Development / Database)
File: lambda.md

Let you combine multiple expressions into a single callable value. List arguments in round brackets, following them by the arrow and lambda function body. The lambda function body includes either an expression in round brackets or curly brackets around an optional chain of assignments and the call result after the `RETURN` keyword in the last expression. The scope for the lambda body: first the local named expressions, then arguments, then named expressions defined above by the lambda function at the top level of the query. Only use pure expressions inside the lambda body (those might also be other lambdas, possibly passed through arguments). However, you can't use , , or other top-level expressions. One or more of the last lambda parameters can be marked with a question mark as optional: if they haven't been specified when calling lambda, they are assigned the `NULL` value. Examples ```yql $f = ($y) -> { $prefix = "x"; RETURN $prefix || $y; }; $g = ($y) -> ("x" || $y); $h = ($x, $y?) -> ($x + ($y ?? 0)); SELECT $f("y"), $g("z"), $h(1), $h(2, 3); -- "xy", "xz", 1, 5 ``` ```yql -- if the lambda result is calculated by a single expression, then you can use a more compact syntax: $f = ($x, $_) -> ($x || "suffix"); -- the second argument is not used SELECT $f("prefix_", "whatever"); ```
Project: ShardingSphere (App Definition and Development / Database)
File: show-sql-federation-rule.en.md

+++ title = "SHOW SQL_FEDERATION RULE" weight = 8 +++ The `SHOW SQL_FEDERATION RULE` syntax is used to query the federated query configuration. {{< tabs >}} {{% tab name="Grammar" %}} ```sql ShowSQLFederationRule ::= 'SHOW' 'SQL_FEDERATION' 'RULE' ``` {{% /tab %}} {{% tab name="Railroad diagram" %}} <iframe frameborder="0" name="diagram" id="diagram" width="100%" height="100%"></iframe> {{% /tab %}} {{< /tabs >}} | Column | Description | ||--| | sqlfederationenabled | SQL federation enabled configuration | | allqueryusesqlfederation | all query use SQL federation configuration | | executionplancache | execution plan cache configuration | Query sql federation rule configuration ```sql SHOW SQL_FEDERATION RULE; ``` ```sql mysql> show sql_federation rule; +++-+ | sqlfederationenabled | allqueryusesqlfederation | executionplancache | +++-+ | true | false | initialCapacity: 2000, maximumSize: 65535 | +++-+ 1 row in set (0.31 sec) ``` `SHOW``SQL_FEDERATION``RULE`
Project: KICS (Provisioning / Security & Compliance)
File: 350cd468-0e2c-44ef-9d22-cfb73a62523c.md

title: S3 Bucket Without Restriction Of Public Bucket hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 350cd468-0e2c-44ef-9d22-cfb73a62523c Query name: S3 Bucket Without Restriction Of Public Bucket Platform: CloudFormation Severity: <span style="color:#ff7213">Medium</span> Category: Insecure Configurations URL: S3 bucket without restriction of public bucket<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="10 4 21" Resources: Bucket11: Type: AWS::S3::Bucket Properties: Resources: Bucket12: Type: AWS::S3::Bucket Properties: PublicAccessBlockConfiguration: BlockPublicPolicy : true Resources: Bucket13: Type: AWS::S3::Bucket Properties: PublicAccessBlockConfiguration: BlockPublicAcls: false BlockPublicPolicy : true IgnorePublicAcls : false RestrictPublicBuckets : false ``` ```json title="Positive test num. 2 - json file" hl_lines="10" { "Resources": { "Bucket1": { "Type": "AWS::S3::Bucket", "Properties": { "PublicAccessBlockConfiguration": { "BlockPublicAcls": false, "BlockPublicPolicy": true, "IgnorePublicAcls": false, "RestrictPublicBuckets": false }, "AccessControl": "Private" } } } } ``` ```yaml title="Negative test num. 1 - yaml file" Resources: Bucket1: Type: AWS::S3::Bucket Properties: PublicAccessBlockConfiguration: BlockPublicAcls : true BlockPublicPolicy : true IgnorePublicAcls : true RestrictPublicBuckets : true ``` ```json title="Negative test num. 2 - json file" { "Resources": { "Bucket1": { "Type": "AWS::S3::Bucket", "Properties": { "PublicAccessBlockConfiguration": { "BlockPublicAcls": true, "BlockPublicPolicy": true, "IgnorePublicAcls": true, "RestrictPublicBuckets": true }, "AccessControl": "Private" } } } } ```
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-ref-syntax-ddl-repair-table.md

layout: global title: REPAIR TABLE displayTitle: REPAIR TABLE 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. `REPAIR TABLE` recovers all the partitions in the directory of a table and updates the Hive metastore. When creating a table using `PARTITIONED BY` clause, partitions are generated and registered in the Hive metastore. However, if the partitioned table is created from existing data, partitions are not registered automatically in the Hive metastore. User needs to run `REPAIRTABLE`to register the partitions. `REPAIR TABLE` on a non-existent table or a table without partitions throws an exception. Another way to recover partitions is to use `ALTER TABLE RECOVER PARTITIONS`. This command can also be invoked using `MSCK REPAIR TABLE`, for Hive compatibility. If the table is cached, the command clears cached data of the table and all its dependents that refer to it. The cache will be lazily filled when the next time the table or the dependents are accessed. ```sql [MSCK] REPAIR TABLE table_identifier [{ADD|DROP|SYNC} PARTITIONS] ``` table_identifier* Specifies the name of the table to be repaired. The table name may be optionally qualified with a database name. Syntax: `[ databasename. ] tablename` `{ADD|DROP|SYNC} PARTITIONS`* Specifies how to recover partitions. If not specified, ADD is the default. ADD*, the command adds new partitions to the session catalog for all sub-folder in the base table folder that don't belong to any table partitions. DROP*, the command drops all partitions from the session catalog that have non-existing locations in the file system. SYNC is the combination of DROP and ADD*. ```sql -- create a partitioned table from existing data /tmp/namesAndAges.parquet CREATE TABLE t1 (name STRING, age INT) USING parquet PARTITIONED BY (age) LOCATION "/tmp/namesAndAges.parquet"; -- SELECT * FROM t1 does not return results SELECT * FROM t1; -- run REPAIR TABLE to recovers all the partitions REPAIR TABLE t1; -- SELECT * FROM t1 returns results SELECT * FROM t1; +-++ | name|age| +-++ |Michael| 20| +-++ | Justin| 19| +-++ | Andy| 30| +-++ ```
Project: YugabyteDB (App Definition and Development / Database)
File: chapter1-full-text-search.md

```text space travel ``` The service will use the prompt to perform a full-text search across movie overviews. The results will appear as follows: PostgreSQL can filter movies by rank and category before doing the full-text search. For instance, set rank to 7, choose Science Fiction as the category, and repeat the search again: Here's the SQL query that YugaPlus uses to find the movie recommendations: ```sql SELECT id, title, overview, voteaverage, releasedate FROM movie WHERE vote_average >= :rank AND genres @> :category::jsonb AND overviewlexemes @@ plaintotsquery('english', :prompt) LIMIT :max_results ```
Project: Shifu (Provisioning / Automation & Configuration)
File: build-shifu.md

Finish setting up using the setup guide: / We have provided a `Docker` Dev Container environment that simplifies setup and provides consistent environment across all platforms. Navigate to `Shifu`'s root directory, use the following commands to build different *deviceShifu*: For `HTTP to HTTP` *deviceShifu*: ```sh CGO_ENABLED=0 GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) go build -a -o output/deviceshifu-http-http cmd/deviceshifu/cmdHTTP/main.go ``` For `HTTP to Socket` *deviceShifu*: ```sh CGO_ENABLED=0 GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) go build -a -o output/deviceshifu-http-socket cmd/deviceshifu/cmdSocket/main.go ``` For `HTTP to MQTT` *deviceShifu*: ```sh CGO_ENABLED=0 GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) go build -a -o output/deviceshifu-http-mqtt cmd/deviceshifu/cmdMQTT/main.go ``` For `HTTP to OPC UA` *deviceShifu*: ```sh CGO_ENABLED=0 GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) go build -a -o output/deviceshifu-http-opcua cmd/deviceshifu/cmdOPCUA/main.go ``` Run the following command, this will build the following *deviceShifu* images with current tag and load it into `Docker` images: ```sh make buildx-load-image-deviceshifu ``` Images built: ``` edgenesis/deviceshifu-http-http:{VERSION} edgenesis/deviceshifu-http-socket:{VERSION} edgenesis/deviceshifu-http-mqtt:{VERSION} edgenesis/deviceshifu-http-opcua:{VERSION} ``` Navigate to `shifu/k8s/crd`, use the following command to build *shifuController* binary: ```sh make build ``` Run the following command, this will build the following *shifuController* image with current tag and load it into `Docker` images: ```sh make docker-buildx-load IMG=edgehub/edgedevice-controller-multi:v0.0.1 ``` Follow our and start using `Shifu`.