cwielenb/CNCF-Dataset huggingface dataset:
Project: KICS (Provisioning / Security & Compliance)
File: 8212e2d7-e683-49bc-bf78-d6799075c5a7.md

title: Compute Instance Is Publicly Accessible hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 8212e2d7-e683-49bc-bf78-d6799075c5a7 Query name: Compute Instance Is Publicly Accessible Platform: GoogleDeploymentManager Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: Compute instances shouldn't be accessible from the Internet.<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="8" resources: name: instance type: compute.v1.instance properties: scheduling: automaticRestart: true networkInterfaces: accessConfigs: name: External NAT type: ONETOONE_NAT network: network ``` ```yaml title="Negative test num. 1 - yaml file" resources: name: instance2 type: compute.v1.instance properties: scheduling: automaticRestart: true networkInterfaces: network: network ```
Project: YugabyteDB (App Definition and Development / Database)
File: ta-20648.md

title: TA-20648 headerTitle: Index update can be wrongly applied on batch writes headcontent: 23 Jan 2024 type: docs showRightNav: true cascade: unversioned: true menu: preview_releases: identifier: ta-20648 weight: 1 rightNav: hideH2: true type: docs | Product | Affected Versions | Related Issues | Fixed In | | :- | : | :- | :- | | {{<product "ysql">}} | {{<release "2.20.x, 2.19.x">}} | {{<issue 20648>}} | {{<release "2.20.1.3, 2.20.2+, 2.21.0">}} | The impacted releases contain an issue where an index update can be wrongly applied, leading to index corruption in the following rare cases: Update to a table with non-unique indexes and self-referential triggers where both the index updates, and the trigger application affect the same rows. Multi-row update to a table with a non-unique partial index. If you're using a {{<release "2.20">}} series release prior to {{<release "2.20.1.3">}}, it is recommended that you upgrade to YugabyteDB {{<release "2.20.1.3">}} or later. The fix ensures new writes to get executed correctly. But it will not repair existing inconsistent data. To fix inconsistent indexes, the indexes need to be recreated. It is advisable to create a new index, and then drop the older one.
Project: Cloud Custodian (Provisioning / Automation & Configuration)
File: todo.md

General [ x ] multi-day flow log downloading [ ] s3 write out of enhanced flow log [ ] resolver time window optimizations, vpc / subnet info [ ] ipdb vpc/subnet info Realtime Ingest Support Ipdb -> s3 monthly segmentation Metrics collection Periodic scale out Account tools/c7n-log-exporter [ ] multi-region flow log aggregation [ ] move region buckets ingest metrics and enhanced flow logs to
Project: KubeVela (App Definition and Development / Application Definition & Image Build)
File: how-to.md

Create an ECS that can connect github. Create a normal user(DON'T use `root`). Install Dependencies: Kind Docker `apt install docker.io`, and the user to docker group(`usermod -aG docker <user>`) Kubectl Go(1.14 for now, must align with CI) Helm v3 ginkgo Add all these dependencies to $PATH. Install Custom runner agent https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners Run the runner as service https://docs.github.com/en/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service
Project: KICS (Provisioning / Security & Compliance)
File: 30e8dfd2-3591-4d19-8d11-79e93106c93d.md

title: Stackdriver Monitoring Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 30e8dfd2-3591-4d19-8d11-79e93106c93d Query name: Stackdriver Monitoring Disabled Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: Kubernetes Engine Clusters must have Stackdriver Monitoring enabled, which means the attribute 'monitoring_service' must be defined and different than 'none'<br> ```tf title="Positive test num. 1 - tf file" hl_lines="18 6" resource "googlecontainercluster" "positive1" { name = "marcellus-wallace" location = "us-central1-a" initialnodecount = 3 monitoring_service = "none" timeouts { create = "30m" update = "40m" } } resource "googlecontainercluster" "positive2" { name = "marcellus-wallace" location = "us-central1-a" initialnodecount = 3 monitoring_service = "monitoring.googleapis.com" timeouts { create = "30m" update = "40m" } } ``` ```tf title="Negative test num. 1 - tf file" resource "googlecontainercluster" "negative1" { name = "marcellus-wallace" location = "us-central1-a" initialnodecount = 3 monitoring_service = "monitoring.googleapis.com/kubernetes" timeouts { create = "30m" update = "40m" } } resource "googlecontainercluster" "negative1" { name = "marcellus-wallace" location = "us-central1-a" initialnodecount = 3 timeouts { create = "30m" update = "40m" } } ```
Project: Backstage (App Definition and Development / Application Definition & Image Build)
File: product.md

id: product title: Product FAQ description: Questions related to product and design. Yes, Backstage is just a framework for building your own developer portal. We happen to call our internal version Backstage, as well, as a reference to our music roots. You can call your version whatever suits your team, company, or brand. No, but it can be! Backstage is designed to be a developer portal for all your infrastructure tooling, services, and documentation. So, it's not a monitoring platform but that doesn't mean you can't integrate a monitoring tool into Backstage by writing . Backstage was released as open source software by Spotify and is licensed under . We hope to see Backstage become the infrastructure standard everywhere. When we saw how much Backstage improved developer experience and productivity internally, we wanted to share those gains. After all, if Backstage can create order in an engineering environment as open and diverse as ours, then we're pretty sure it can create order (and boost productivity) anywhere. To learn more, read our blog post, "" Yes, we've already started releasing open source versions of some of the plugins we use here, and we'll continue to do so. are the building blocks of functionality in Backstage. We have over 120 plugins inside Spotify many of those are specialized for our use, so will remain internal and proprietary to us. But we estimate that about a third of our existing plugins make good open source candidates. (And we'll probably end up writing some brand new ones, too.) We envision three phases, which you can learn about in . Even though the open source version of Backstage is relatively new compared to our internal version, we have already begun work on various aspects of all three phases. Looking at the will also give you a sense of our progress. Not at all! A core reason to adopt Backstage is to standardize how software is built at your company. It's easier to decide on those standards as a small company, and grows in importance as the company grows. Backstage sets a foundation, and an early investment in your infrastructure becomes even more valuable as you grow. Yes! The Backstage UI is built using Material UI. With the theming capabilities of Material UI, you are able to adapt the interface to your brand guidelines.
Project: StarRocks (App Definition and Development / Database)
File: asin.md

displayed_sidebar: "English" Computes the arc sine of the argument. ```Haskell DOUBLE asin(DOUBLE arg) ``` `arg`: You can specify only a numeric value. This function converts the numeric value into a DOUBLE value before it computes the arc sine of the value. Returns a value of the DOUBLE data type. If you specify a non-numeric value, this function returns `NULL`. ```Plain mysql> select asin(1); +--+ | asin(1) | +--+ | 1.5707963267948966 | +--+ mysql> select asin(-0.5); ++ | asin(-0.5) | ++ | -0.5235987755982989 | ++ mysql> select asin(0); ++ | asin(0) | ++ | 0 | ++ mysql> select asin(""); +-+ | asin('') | +-+ | NULL | +-+ ``` ASIN
Project: Numaflow (App Definition and Development / Streaming & Messaging)
File: fallback.md

A `Fallback` Sink functions as a `Dead Letter Queue (DLQ)` Sink and can be configured to serve as a backup when the primary sink is down, unavailable, or under maintenance. This is particularly useful when multiple sinks are in a pipeline; if a sink fails, the resulting back-pressure will back-propagate and stop the source vertex from reading more data. A `Fallback` Sink can beset up to prevent this from happening. This backup sink stores data while the primary sink is offline. The stored data can be replayed once the primary sink is back online. Note: The `fallback` field is optional. Users are required to return a fallback response from the when the primary sink fails; only then the messages will be directed to the fallback sink. Example of a fallback response in a user-defined sink: The `fallback` field can only be utilized when the primary sink is a `User Defined Sink.` An example using builtin kafka as fallback sink: ```yaml name: out sink: udsink: container: image: my-sink:latest fallback: kafka: brokers: my-broker1:19700 my-broker2:19700 topic: my-topic ``` An example using custom user-defined sink as fallback sink. User Defined Sink as a fallback sink: ```yaml name: out sink: udsink: container: image: my-sink:latest fallback: udsink: container: image: my-sink:latest ```
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.6.10.md

layout: release date: 2022-10-03 tag: v0.6.10 language: en [Refactor] strings.Title has been deprecated @XDRAGON2002 (#6261) [Feat] Add support for registering components @sudo-NithishKarthik (#6250) [CI] Update Meshery and Adapter version used in integration tests @leecalcote (#6243) Displaying k8s context name on Meshsync modal @legendarykamal (#6306) Allow to delete last cluster @MUzairS15 (#6276) Export material ui avatar components @nishantwrp (#6304) Added tooltip to the application, filter and pattern cards @dara-soji (#6224) Add validation for pattern files @MUzairS15 (#6247) Aligned namespace and name in RJSF @Harshit-Dandriyal (#6246) [rjsf] some small fixes @harkiratsm (#6239) Fix: GraphQL subscription bottleneck connecting to the server @Abhishek-kumar09 (#6244) Bump gonum.org/v1/gonum from 0.11.0 to 0.12.0 @dependabot (#6299) [CI] Golang: Remove unnecessary redis pkg version pin @leecalcote (#6283) [CI] Golang: Removing unnecessary deps @leecalcote (#6275) Make core workflow more general @Revolyssup (#6263) Add sleep in E2E workflow for failing test @Revolyssup (#6262) fix: Lint checks @sudo-NithishKarthik (#6254) [CI] Update Meshery and Adapter version used in integration tests @leecalcote (#6243) [Docs] HTML error in Compatibility Matrix @XDRAGON2002 (#6307) Fixed Typo @UtkarshMishra12 (#6292) Fixed Typo @UtkarshMishra12 (#6287) Fixed Typo @UtkarshMishra12 (#6281) [Docs] update the helm charts installation steps @XDRAGON2002 (#6238) Bump commonmarker from 0.23.5 to 0.23.6 in /docs @dependabot (#6233) Thank you to our contributors for making this release possible: @Abhishek-kumar09, @Chadha93, @Harshit-Dandriyal, @MUzairS15, @Revolyssup, @UtkarshMishra12, @XDRAGON2002, @dara-soji, @dependabot, @dependabot[bot], @harkiratsm, @l5io, @leecalcote, @legendarykamal, @nishantwrp, @sudo-NithishKarthik and l5io
Project: Meshery (Provisioning / Automation & Configuration)
File: posthog.md

layout: integration title: Posthog subtitle: Collaborative and visual infrastructure as code for Posthog image: /assets/img/integrations/posthog/icons/color/posthog-color.svg permalink: extensibility/integrations/posthog docURL: https://docs.meshery.io/extensibility/integrations/posthog description: integrations-category: App Definition and Development integrations-subcategory: Database registrant: Artifact Hub components: 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: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-ref-syntax-aux-conf-mgmt-reset.md

layout: global title: RESET displayTitle: RESET 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. The RESET command resets runtime configurations specific to the current session which were set via the command to their default values. ```sql RESET; RESET configuration_key; ``` (none)* Reset any runtime configurations specific to the current session which were set via the command to their default values. configuration_key* Restore the value of the `configurationkey` to the default value. If the default value is undefined, the `configurationkey` will be removed. ```sql -- Reset any runtime configurations specific to the current session which were set via the SET command to their default values. RESET; -- If you start your application with --conf spark.foo=bar and set spark.foo=foobar in runtime, the example below will restore it to 'bar'. If spark.foo is not specified during starting, the example below will remove this config from the SQLConf. It will ignore nonexistent keys. RESET spark.abc; ```
Project: Beam (App Definition and Development / Streaming & Messaging)
File: keys.md

title: "Keys" <!-- 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. --> {{< localstorage language language-py >}} {{< button-pydoc path="apache_beam.transforms.util" class="Keys" >}} Takes a collection of key-value pairs and returns the key of each element. In the following example, we create a pipeline with a `PCollection` of key-value pairs. Then, we apply `Keys` to extract the keys and discard the values. {{< playground height="700px" >}} {{< playgroundsnippet language="py" path="SDKPYTHON_Keys" show="keys" >}} {{< /playground >}} swaps the key and value of each element. for extracting the value of each element. {{< button-pydoc path="apache_beam.transforms.util" class="Keys" >}}
Project: userver (App Definition and Development / Streaming & Messaging)
File: SECURITY.md

Security fixes will be announced by posting them in the . The following versions of userver are currently being supported with security updates: | Version | Supported | |:-|:-| | develop | | We're extremely grateful for security researchers and users that report vulnerabilities to the userver Open Source Community. All reports are thoroughly investigated by developers. userver is the part of the "The Yandex Bug Bounty" program. To report a potential vulnerability or weakness in userver please send the details about it to . You think you discovered a potential security vulnerability in userver You are unsure how a vulnerability affects userver You need help tuning userver components for security You need help applying security related updates Your issue is not security related Each report is acknowledged and analyzed by userver maintainers within 5 working days. As the security issue moves from triage, to identified fix, to release planning we will keep the reporter updated. A public disclosure date is negotiated by the userver maintainers and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate to 90 days. For a vulnerability with a straightforward mitigation, we expect report date to disclosure date to be on the order of 7 days.
Project: StarRocks (App Definition and Development / Database)
File: CANCEL_ALTER_TABLE.md

displayed_sidebar: "English" Cancels the execution of the ongoing ALTER TABLE operation, including: Modify columns. Optimize table schema (from v3.2), including modifying the bucketing method and the number of buckets. Create and delete the rollup index. NOTICE This statement is a synchronous operation. This statement requires you to have the `ALTER_PRIV` privilege on the table. This statement only supports canceling asynchronous operations using ALTER TABLE (as mentioned above) and does not support canceling synchronous operations using ALTER TABLE, such as rename. ```SQL CANCEL ALTER TABLE { COLUMN | OPTIMIZE | ROLLUP } FROM [dbname.]tablename ``` `{COLUMN OPTIMIZE | ROLLUP}` If `COLUMN` is specified, this statement cancels operations of modifying columns. If `OPTIMIZE` is specified, this statement cancels operations of optimizing table schema. If `ROLLUP` is specified, this statement cancels operations of adding or deleting the rollup index. `db_name`: optional. The name of the database to which the table belongs. If this parameter is not specified, your current database is used by default. `table_name`: required. The table name. Cancel the operation of modifying columns for `exampletable` in the database `exampledb`. ```SQL CANCEL ALTER TABLE COLUMN FROM exampledb.exampletable; ``` Cancel the operation of optimizing table schema for `exampletable` in the database `exampledb`. ```SQL CANCEL ALTER TABLE OPTIMIZE FROM exampledb.exampletable; ``` Cancel the operation of adding or deleting the rollup index for `example_table` in the current database. ```SQL CANCEL ALTER TABLE ROLLUP FROM example_table; ```
Project: StarRocks (App Definition and Development / Database)
File: date_format.md

displayed_sidebar: "English" Converts a date into a string according to the specified format. Currently it supports strings with a maximum of 128 bytes. If the length of the returned value exceeds 128, NULL is returned. ```Haskell VARCHAR DATE_FORMAT(DATETIME date, VARCHAR format) ``` The `date` parameter must be a valid date or date expression. `format` specifies the output format of the date or time. Here are the formats available: ```Plain Text %a | Abbreviated weekday name (Sun to Sat) %b | Abbreviated month name (Jan to Dec) %c | Numeric month name (0-12) %D | Day of the month as a numeric value, followed by suffix in English %d | Day of the month as a numeric value (00-31) %e | Day of the month as a numeric value (0-31) %f | Microseconds %H | Hour (00-23) %h | Hour (01-12) %I | Hour (01-12) %i | Minutes (00-59) %j | Day of the year (001-366) %k | Hour (0-23) %l | Hour (1-12) %M | Month name in full %m | Month name as a numeric value (00-12) %p | AM or PM %r | Time in 12 hour (hh:mm:ss AM or PM) %S | Seconds (00-59) %s | Seconds (00-59) %T | Time in 24 hour format (hh:mm:ss) %U | Week (00-53) where Sunday is the first day of the week %u | Week (00-53) where Monday is the first day of the week %V | Week (01-53) where Sunday is the first day of the week. Used with %X. %v | Week (01-53) where Monday is the first day of the week. Used with %x. %W | Weekday name in full %w | Day of the week where Sunday=0 and Saturday=6 %X | Year for the week where Sunday is the first day of the week. 4-digital value. Used with %V. %x | Year for the week where Monday is the first day of the week. 4-digital value. Used with %v. %Y | Year. 4-digital value. %y | Year. 2-digital value. %% | Represent %. ``` ```Plain Text MySQL > select date_format('2009-10-04 22:23:00', '%W %M %Y'); ++ | date_format('2009-10-04 22:23:00', '%W %M %Y') | ++ | Sunday October 2009 | ++ MySQL > select date_format('2007-10-04 22:23:00', '%H:%i:%s'); ++ | date_format('2007-10-04 22:23:00', '%H:%i:%s') | ++ | 22:23:00 | ++ MySQL > select date_format('1900-10-04 22:23:00', '%D %y %a %d %m %b %j'); ++ | date_format('1900-10-04 22:23:00', '%D %y %a %d %m %b %j') | ++ | 4th 00 Thu 04 10 Oct 277 | ++ MySQL > select date_format('1997-10-04 22:23:00', '%H %k %I %r %T %S %w'); ++ | date_format('1997-10-04 22:23:00', '%H %k %I %r %T %S %w') | ++ | 22 22 10 10:23:00 PM 22:23:00 00 6 | ++ MySQL > select date_format('1999-01-01 00:00:00', '%X %V'); ++ | date_format('1999-01-01 00:00:00', '%X %V') | ++ | 1998 52 | ++ MySQL > select date_format('2006-06-01', '%d'); ++ | date_format('2006-06-01 00:00:00', '%d') | ++ | 01 | ++ MySQL > select date_format('2006-06-01', '%%%d'); +--+ | date_format('2006-06-01 00:00:00', '%%%d') | +--+ | %01 | +--+ ``` DATE_FORMAT,DATE,FORMAT
Project: YugabyteDB (App Definition and Development / Database)
File: do-report-results.md

title: doreportresults.sql linkTitle: doreportresults.sql headerTitle: doreportresults.sql description: doreportresults.sql - Create the function that creates the histogram output. menu: v2.18: identifier: do-report-results parent: analyzing-a-normal-distribution weight: 150 type: docs Save this script as `doreportresults.sql`. ```plpgsql \t on select 'Using ntile().'; \t off select bucket, n, tochar(mins, '990.99999') as min_s, tochar(maxs, '990.99999') as max_s from results where method = 'ntile' order by bucket; \t on select 'Using percent_rank().'; select bucket, n, tochar(mins, '990.99999') as min_s, tochar(maxs, '990.99999') as max_s from results where method = 'percent_rank' order by bucket; select 'Using cume_dist().'; select bucket, n, tochar(mins, '990.99999') as min_s, tochar(maxs, '990.99999') as max_s from results where method = 'cume_dist' order by bucket; \t off ```
Project: KICS (Provisioning / Security & Compliance)
File: aa93e17f-b6db-4162-9334-c70334e7ac28.md

title: Chown Flag Exists hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: aa93e17f-b6db-4162-9334-c70334e7ac28 Query name: Chown Flag Exists Platform: Dockerfile Severity: <span style="color:#edd57e">Low</span> Category: Best Practices URL: It is considered a best practice for every executable in a container to be owned by the root user even if it is executed by a non-root user, only execution permissions are required on the file, not ownership<br> ```dockerfile title="Positive test num. 1 - dockerfile file" hl_lines="4" FROM python:3.7 RUN pip install Flask==0.11.1 RUN useradd -ms /bin/bash patrick COPY --chown=patrick:patrick app /app WORKDIR /app USER patrick CMD ["python", "app.py"] ``` ```dockerfile title="Negative test num. 1 - dockerfile file" FROM python:3.7 RUN pip install Flask==0.11.1 RUN useradd -ms /bin/bash patrick COPY app /app WORKDIR /app USER patrick CMD ["python", "app.py"] ```