cwielenb/CNCF-Dataset huggingface dataset:
Project: JReleaser (App Definition and Development / Application Definition & Image Build)
File: CODE_OF_CONDUCT.md

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. Examples of behavior that contributes to creating a positive environment include: Using welcoming and inclusive language Being respectful of differing viewpoints and experiences Gracefully accepting constructive criticism Focusing on what is best for the community Showing empathy towards other community members Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or advances Trolling, insulting/derogatory comments, and personal or political attacks Public or private harassment Publishing others' private information, such as a physical or electronic address, without explicit permission Other conduct which could reasonably be considered inappropriate in a professional setting Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@kordamp.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. This Code of Conduct is adapted from the , version 1.4, available at
Project: KICS (Provisioning / Security & Compliance)
File: 16c4216a-50d3-4785-bfb2-4adb5144a8ba.md

title: Elasticsearch Domain With Vulnerable Policy hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 16c4216a-50d3-4785-bfb2-4adb5144a8ba Query name: Elasticsearch Domain With Vulnerable Policy Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Access Control URL: Elasticsearch Domain policy should avoid wildcard in 'Action' and 'Principal'.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="18" provider "aws" { region = "us-east-1" } resource "awselasticsearchdomain" "es-not-secure-policy" { domain_name = "es-not-secure-policy" ebs_options { ebs_enabled = true volume_size = 10 volume_type = "gp2" } } resource "awselasticsearchdomain_policy" "main" { domainname = awselasticsearchdomain.es-not-secure-policy.domainname access_policies = <<POLICIES { "Version": "2012-10-17", "Statement": [ { "Action": "es:*", "Principal": "*", "Effect": "Allow" } ] } POLICIES } ``` ```tf title="Negative test num. 1 - tf file" resource "awselasticsearchdomain" "example2" { domain_name = "tf-test" elasticsearch_version = "2.3" } resource "awselasticsearchdomain_policy" "main2" { domainname = awselasticsearchdomain.example2.domainname access_policies = <<POLICIES { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": [ "arn:aws:iam::123456789012:user/test-user" ] }, "Action": [ "es:ESHttpGet" ], "Resource": "arn:aws:es:us-west-1:987654321098:domain/test-domain/test-index/_search" } ] } POLICIES } ```
Project: ShardingSphere (App Definition and Development / Database)
File: infra-algorithm.en.md

+++ pre = "<b>5.4. </b>" title = "Infra algorithm" weight = 4 chapter = true +++ Load balance algorithms, they can be used in readwrite-splitting and traffic features. | Configuration Type | Description | Fully-qualified class name | |-|--|--| | ROUND_ROBIN | load balancer algorithm based on polling | | | RANDOM | load balancer algorithm based on random | | | WEIGHT | load balancer algorithm based on weight | | Distributed key generated algorithms, they can be used in sharding feature. | Configuration Type | Description | Fully-qualified class name | |-|-|-| | SNOWFLAKE | Snowflake key generate algorithm | | | UUID | UUID key generate algorithm | | Message digest algorithms, they can be used in encrypt and mask feature. | Configuration Type | Description | Fully-qualified class name | |-||-| | MD5 | MD5 message digest algorithm | |
Project: StarRocks (App Definition and Development / Database)
File: SHOW_CREATE_VIEW.md

displayed_sidebar: "English" Returns the CREATE statement that was used to create a given view. The CREATE VIEW statement helps you understand how the view is defined and provides a reference for you to modify or reconstruct the view. Note that the SHOW CREATE VIEW statement requires you to have the `SELECT` privilege on the view and the table based on which the view is created. From v2.5.4 onwards, you can use SHOW CREATE VIEW to query the statement that is used to create a materialized view. ```SQL SHOW CREATE VIEW [dbname.]viewname ``` | Parameter | Required | Description | | - | | | | db_name | No | The database name. If this parameter is not specified, the CREATE VIEW statement of a given view in your current database is returned by default. | | view_name | Yes | The view name. | ```SQL ++--+-+-+ | View | Create View | charactersetclient | collation_connection | ++--+-+-+ ``` The following table describes the parameters returned by this statement. | Parameter | Description | | -- | | | View | The view name. | | Create View | The CREATE VIEW statement of the view. | | charactersetclient | The character set the client uses to send statements to StarRocks. | | collation_connection | The rules for comparing characters in a character set. | Create a table named `example_table`. ```SQL CREATE TABLE example_table ( k1 TINYINT, k2 DECIMAL(10, 2) DEFAULT "10.5", v1 CHAR(10) REPLACE, v2 INT SUM ) ENGINE = olap AGGREGATE KEY(k1, k2) DISTRIBUTED BY HASH(k1); ``` Create a view named `exampleview` based on `exampletable`. ```SQL CREATE VIEW example_view (k1, k2, k3, v1) AS SELECT k1, k2, k3, v1 FROM example_table; ``` Display the CREATE VIEW statement of `example_view`. ```Plain SHOW CREATE VIEW exampledb.exampleview; +--++-+-+ | View | Create View | charactersetclient | collation_connection | +--++-+-+ | exampleview | CREATE VIEW `exampleview` (k1, k2, k3, v1) COMMENT "VIEW" AS SELECT `defaultcluster:db1`.`exampletable`.`k1` AS `k1`, `defaultcluster:db1`.`exampletable`.`k2` AS `k2`, `defaultcluster:db1`.`exampletable`.`k3` AS `k3`, `defaultcluster:db1`.`exampletable`.`v1` AS `v1` FROM `defaultcluster:db1`.`exampletable`; | utf8 | utf8generalci | +--++-+-+ ```
Project: Trivy (Provisioning / Security & Compliance)
File: trivy_plugin_run.md

Run a plugin on the fly ``` trivy plugin run NAME | URL | FILE_PATH ``` ``` -h, --help help for run ``` ``` --cache-dir string cache directory (default "/path/to/cache") -c, --config string config path (default "trivy.yaml") -d, --debug debug mode --generate-default-config write the default config to trivy-default.yaml --insecure allow insecure server connections -q, --quiet suppress progress bar and log output --timeout duration timeout (default 5m0s) -v, --version show version ``` - Manage plugins
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.6.0-rc-5i.md

layout: release date: 2022-04-02 tag: v0.6.0-rc-5i language: en Deployments and services for cilium mesh @MUzairS15 (#5315) migrating material-ui v4 to mui v5 @warunicorn19 (#5303) [GraphQL] getOAMComponents queryType @piyushsingariya (#5267) meshery-perf: disable this chart @leecalcote (#5295) [DDE] Configure go based proxy for the UI to talk to localhost:9081 @sudo-NithishKarthik (#5299) removed underline @warunicorn19 (#5296) [mesheryctl] Fix panic on version check @gr455 (#5298) Deploying Meshery components under same helm release name @piyushsingariya (#5173) Bump cypress from 9.2.0 to 9.5.3 in /ui @dependabot (#5323) Bump cypress from 9.5.1 to 9.5.3 in /provider-ui @dependabot (#5321) Reverting Bump eslint from 7.32.0 to 8.12.0 in /ui @leecalcote (#5316) [UI/Pattern] Fix pattern-upload failure @Abhishek-kumar09 (#5314) minor: use extension in place of MM @Abhishek-kumar09 (#5312) Bump eslint from 7.32.0 to 8.12.0 in /ui @dependabot (#5302) [RJSF] Menu-component portal shift for tooltips and add slider for percent @Abhishek-kumar09 (#5304) Fix: Lifecycle component fix, handling routing and handle unactive adapter @Abhishek-kumar09 (#5307) Bump cypress from 9.2.0 to 9.5.3 in /ui @dependabot (#5323) Bump gonum.org/v1/gonum from 0.9.3 to 0.11.0 @dependabot (#5330) Bump cypress from 9.5.1 to 9.5.3 in /provider-ui @dependabot (#5321) [Deps] bump to MeshKit v0.5.12 @leecalcote (#5311) Bump eslint from 7.32.0 to 8.12.0 in /ui @dependabot (#5302) [Docs] Fix typo in markdown @theBeginner86 (#5319) [Docs] Update for Jekyll server commands @cpepper96 (#5308) Thank you to our contributors for making this release possible: @Abhishek-kumar09, @MUzairS15, @cpepper96, @dependabot, @dependabot[bot], @gr455, @leecalcote, @piyushsingariya, @sudo-NithishKarthik, @theBeginner86 and @warunicorn19
Project: YugabyteDB (App Definition and Development / Database)
File: expr_simple.md

title: Simple expressions [YCQL] headerTitle: Simple expressions linkTitle: Simple expressions description: A simple expression can be a column, constant, or NULL. menu: v2.18: parent: api-cassandra weight: 1331 type: docs A simple expression can be a column, a constant, or NULL. A column expression refers to a column in a table by using its name, which can be either a fully qualified name or a simple name. ``` columnexpression ::= [columnname] ``` A constant expression represents a simple value by using literals. ``` constant_expression ::= string | number ``` When an expression, typically a column, does not have a value, it is represented as NULL. ``` null_expression ::= NULL ```
Project: KICS (Provisioning / Security & Compliance)
File: 40abce54-95b1-478c-8e5f-ea0bf0bb0e33.md

title: Google Compute Network Using Default Firewall Rule hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 40abce54-95b1-478c-8e5f-ea0bf0bb0e33 Query name: Google Compute Network Using Default Firewall Rule Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: Google Compute Network should not use default firewall rule<br> ```tf title="Positive test num. 1 - tf file" hl_lines="6" resource "googlecomputefirewall" "positive1" { name = "default" network = googlecomputenetwork.positive1.name } resource "googlecomputenetwork" "positive1" { name = "test-network" } ``` ```tf title="Negative test num. 1 - tf file" resource "googlecomputefirewall" "negative1" { name = "test-firewall" network = googlecomputenetwork.negative1.name allow { protocol = "icmp" } allow { protocol = "tcp" ports = ["80", "8080"] } source_tags = ["web"] } resource "googlecomputenetwork" "negative1" { name = "test-network" } ```
Project: NomsDB (App Definition and Development / Database)
File: demo-p2p-chat.md

Decentralized &nbsp; | &nbsp;&nbsp; | &nbsp;&nbsp; | &nbsp;P2P Chat Demo&nbsp; | &nbsp; <br><br> This sample demonstrates the simplest possible case of building a p2p app on top of Noms. Each node stores a complete copy of the data it is interested in, and peers find each other using . Currently, nodes have to have a publicly routable IP, but it should be possible to use or similar to connect to most nodes. Demo app code is in the directory. To get it up and running take the following steps: Use git to clone the noms repository onto your computer: ```shell go get github.com/attic-labs/noms/samples/go/decent/p2p-chat ``` From the noms/samples/go/decent/p2p-chat directory, build the program with the following command: ```shell go build ``` Run the p2p client with the following command: ```shell mkdir /tmp/noms1 ./p2p-chat client --username=<aname1> --node-idx=1 /tmp/noms1 >& /tmp/err1 ``` Run a second p2p client with the following command: ```shell mkdir /tmp/noms2 ./p2p-chat client --username=<aname2> --node-idx=2 /tmp/noms2 >& /tmp/err2 ``` Note: the p2p client relies on IPFS for it's pub/sub implementation. The 'node-idx' argument ensures that each IPFS-based node uses a distinct set of ports. This is useful when running multiple IPFS-based programs on the same machine.
Project: YugabyteDB (App Definition and Development / Database)
File: jsonb-each-text.md

title: jsonbeachtext() and jsoneachtext() [JSON] headerTitle: jsonbeachtext() and jsoneachtext() linkTitle: jsonbeachtext() description: Create a row set with columns "key" (as a SQL text) and "value" (as a SQL text) from a JSON object. Useful when the results are primitive values. menu: v2.18: identifier: jsonb-each-text parent: json-functions-operators weight: 120 type: docs Purpose: Create a row set with columns "key" (as a SQL `text`) and "value" (as a SQL `text`) from a JSON object. Signature For the `jsonb` variant: ``` input value: jsonb return value: SETOF (text, text) ``` Notes: The result of `jsonbeachtext()` bears the same relationship to the result of as does the result of the operator to that of the operator. For that reason, `jsonbeachtext()` is useful when the results are primitive values. Use this `ysqlsh` script to create the required type "t" and then to execute the `ASSERT`. ```plpgsql create type t as (k text, v text); do $body$ declare object constant jsonb := '{"a": 17, "b": "dog", "c": true, "d": {"a": 17, "b": "cat"}}'; kvpairs t[] := null; expectedkv_pairs constant t[] := array[ ('a', '17'::text), ('b', 'dog'::text), ('c', 'true'::text), ('d', '{"a": 17, "b": "cat"}'::text) ]; kvpair t; n int := 0; begin for kvpair in ( select key, value from jsonbeachtext(object) ) loop n := n + 1; kvpairs[n] := kvpair; end loop; assert kvpairs = expectedkv_pairs, 'unexpected'; end; $body$; ``` Notice that even here, `17` and `true` are SQL `text` values and not, respectively, a SQL `numeric` value and a SQL `boolean` value. Notice too that the `::text` typecast of the underlying `jsonb` value dog is "dog" (as is produced by ) while when it is read as a SQL `text` value by `jsonbeachtext` the result is dog.
Project: KICS (Provisioning / Security & Compliance)
File: 7f8843f0-9ea5-42b4-a02b-753055113195.md

title: Geo Restriction Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 7f8843f0-9ea5-42b4-a02b-753055113195 Query name: Geo Restriction Disabled Platform: CloudFormation Severity: <span style="color:#edd57e">Low</span> Category: Best Practices URL: Geo Restriction feature should be enabled, to restrict or allow users in specific locations accessing web application content<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="13" AWSTemplateFormatVersion: '2010-09-09' Resources: myDistribution: Type: AWS::CloudFront::Distribution Properties: DistributionConfig: Logging: IncludeCookies: 'false' Bucket: mylogs.s3.amazonaws.com Prefix: myprefix Restrictions: GeoRestriction: RestrictionType: none ViewerCertificate: CloudFrontDefaultCertificate: 'true' ``` ```json title="Positive test num. 2 - json file" hl_lines="15" { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "myDistribution": { "Type": "AWS::CloudFront::Distribution", "Properties": { "DistributionConfig": { "Logging": { "IncludeCookies": "false", "Bucket": "mylogs.s3.amazonaws.com", "Prefix": "myprefix" }, "Restrictions": { "GeoRestriction": { "RestrictionType": "none" } }, "ViewerCertificate": { "CloudFrontDefaultCertificate": "true" } } } } } } ``` ```yaml title="Negative test num. 1 - yaml file" AWSTemplateFormatVersion: '2010-09-09' Resources: myDistribution: Type: AWS::CloudFront::Distribution Properties: DistributionConfig: Logging: IncludeCookies: 'false' Bucket: mylogs.s3.amazonaws.com Prefix: myprefix Restrictions: GeoRestriction: RestrictionType: whitelist Locations: AQ CV ViewerCertificate: CloudFrontDefaultCertificate: 'true' ``` ```json title="Negative test num. 2 - json file" { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "myDistribution": { "Type": "AWS::CloudFront::Distribution", "Properties": { "DistributionConfig": { "Logging": { "IncludeCookies": "false", "Bucket": "mylogs.s3.amazonaws.com", "Prefix": "myprefix" }, "Restrictions": { "GeoRestriction": { "RestrictionType": "whitelist", "Locations": [ "AQ", "CV" ] } }, "ViewerCertificate": { "CloudFrontDefaultCertificate": "true" } } } } } } ```
Project: ArangoDB (App Definition and Development / Database)
File: override_outcome_exception.md

+++ title = "`void overrideoutcomeexception(basic_outcome<T, EC, EP, NoValuePolicy> *, U &&) noexcept`" description = "Overrides the exception to something other than what was constructed." +++ Overrides the exception to something other than what was constructed. You almost certainly never want to use this function. A much better way of overriding the exception returned is to create a custom no-value policy which lazily synthesises a custom exception object at the point of need. The only reason that this function exists is because some people have very corner case needs where a custom no-value policy can't be used, and where move-constructing a new `outcome` from an old `outcome` with the exception state replaced isn't possible (e.g. when the types are non-copyable and non-moveable). Unless you are in a situation where no other viable alternative exists, do not use this function. Overridable: Not overridable. Requires: Nothing. Namespace: `BOOSTOUTCOMEV2_NAMESPACE::hooks` Header: `<boost/outcome/basic_outcome.hpp>`
Project: KubeDL (Provisioning / Automation & Configuration)
File: tensorboard.md

KubeDL can attach a tensorboard to a running tensorflow job. Users can visualize the tensorflow job with the tensorboard. To use tensorboard, users must ensure that the tensorflow job logs are created and stored in a kubernetes remote volume (emptyDir, hostPath and local volume are not supported) and the tensorboard pod can mount the volume. Users can set the tensorboard config in the job's annotation with key `kubedl.io/tensorboard-config` as below. After that, users can access the tensorboard through this URL `http://<ingress host>/<ingress pathPrefix>/<job namespace>/<job name>`. For example: ```yaml apiVersion: "training.kubedl.io/v1alpha1" kind: "TFJob" metadata: name: "mnist" namespace: kubedl annotations: kubedl.io/tensorboard-config: '{"logDir":"/var/log/training","ttlSecondsAfterJobFinished":3600,"ingressSpec":{"host":"locahost","pathPrefix":"/tb"}}' spec: cleanPodPolicy: None tfReplicaSpecs: ... ``` A full list of supported options are: ```json { "logDir": "xxx", // the path of the tensorflow job logs (required). "ttlSecondsAfterJobFinished": 3600, // the TTL to clean up the tensorboard after the job is finished (required). "image": "xxx", // the image of the tensorboard, default value is the job's image (optional). "ingressSpec": { // the ingress of the tensorboard (required). "host": "xxx", // the ingress host (required). "pathPrefix": "xxx", // the pathPrefix will be set to the ingress path with the pattern: <pathPrefix>/<job namespace>/<job name> (required). "annotations": { // the annotations of the ingress (optional). "xxx": "xxx" } } } ```
Project: Chef InSpec (Provisioning / Security & Compliance)
File: windows_task.md

+++ title = "windows_task resource" draft = false gh_repo = "inspec" platform = "windows" [menu] [menu.inspec] title = "windows_task" identifier = "inspec/resources/os/windowstask.md windowstask resource" parent = "inspec/resources/os" +++ Use the `windows_task` Chef InSpec audit resource to test a scheduled tasks configuration on a Windows platform. Microsoft and application vendors use scheduled tasks to perform a variety of system maintenance tasks but system administrators can schedule their own. {{< readfile file="content/inspec/reusable/md/inspec_installation.md" >}} This resource first became available in v1.10.0 of InSpec. A `windows_task` resource block declares the name of the task (as its full path) and tests its configuration: describe windows_task('task name uri') do its('parameter') { should eq 'value' } it { should be_enabled } end where `'parameter'` must be a valid parameter defined within this resource ie `logonmode`, `lastresult`, `tasktorun`, `runasuser` `'value'` will be used to compare the value gather from your chosen parameter `'beenabled'` is an example of a valid matcher that checks the state of a task, other examples are `exist` or `bedisabled` The following examples show how to use this Chef InSpec resource. describe windows_task('\Microsoft\Windows\Time Synchronization\SynchronizeTime') do it { should be_enabled } end describe windows_task('\Microsoft\Windows\AppID\PolicyConverter') do it { should be_disabled } end describe windows_task('\Microsoft\Windows\AppID\PolicyConverter') do its('logon_mode') { should eq 'Interactive/Background' } its('last_result') { should eq '1' } its('tasktorun') { should cmp '%Windir%\system32\appidpolicyconverter.exe' } its('runasuser') { should eq 'LOCAL SERVICE' } end describe windows_task('\Microsoft\Windows\Defrag\ScheduledDefrag') do it { should exist } end Rather than use the GUI, you can use the `schtasks.exe` to output a full list of tasks available on the system `schtasks /query /FO list` rather than use the `list` output you can use `CSV` if it is easier. Please make sure you use the full TaskName (include the prefix `\`) within your control C:\>schtasks /query /FO list ... Folder: \Microsoft\Windows\Diagnosis HostName: XPS15 TaskName: \Microsoft\Windows\Diagnosis\Scheduled Next Run Time: N/A Status: Ready Logon Mode: Interactive/Background ... {{< readfile file="content/inspec/reusable/md/inspecmatcherslink.md" >}}
Project: NeuVector (Provisioning / Security & Compliance)
File: fuzzy_mode_convert_table.md

| json type \ dest type | bool | int | uint | float |string| | | | | |--|--| | number | positive => true <br/> negative => true <br/> zero => false| 23.2 => 23 <br/> -32.1 => -32| 12.1 => 12 <br/> -12.1 => 0|as normal|same as origin| | string | empty string => false <br/> string "0" => false <br/> other strings => true | "123.32" => 123 <br/> "-123.4" => -123 <br/> "123.23xxxw" => 123 <br/> "abcde12" => 0 <br/> "-32.1" => -32| 13.2 => 13 <br/> -1.1 => 0 |12.1 => 12.1 <br/> -12.3 => -12.3<br/> 12.4xxa => 12.4 <br/> +1.1e2 =>110 |same as origin| | bool | true => true <br/> false => false| true => 1 <br/> false => 0 | true => 1 <br/> false => 0 |true => 1 <br/>false => 0|true => "true" <br/> false => "false"| | object | true | 0 | 0 |0|originnal json| | array | empty array => false <br/> nonempty array => true| [] => 0 <br/> [1,2] => 1 | [] => 0 <br/> [1,2] => 1 |[] => 0<br/>[1,2] => 1|original json|