cwielenb/CNCF-Dataset huggingface dataset:
Project: KICS (Provisioning / Security & Compliance)
File: 01aec7c2-3e4d-4274-ae47-2b8fea22fd1f.md

title: ECS Task Definition Network Mode Not Recommended hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 01aec7c2-3e4d-4274-ae47-2b8fea22fd1f Query name: ECS Task Definition Network Mode Not Recommended Platform: Ansible Severity: <span style="color:#ff7213">Medium</span> Category: Insecure Configurations URL: NetworkMode should be 'awsvpc' in ecstask_definition. AWS VPCs provides the controls to facilitate a formal process for approving and testing all network connections and changes to the firewall and router configurations<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="31 15" name: Create task definition community.aws.ecs_taskdefinition: family: nginx containers: name: nginx essential: true image: "nginx" portMappings: containerPort: 8080 hostPort: 8080 cpu: 512 memory: 1024 state: present network_mode: default name: Create task definition2 community.aws.ecs_taskdefinition: family: nginx containers: name: nginx essential: true image: "nginx" portMappings: containerPort: 8080 hostPort: 8080 launch_type: FARGATE cpu: 512 memory: 1024 state: present network_mode: none ``` ```yaml title="Negative test num. 1 - yaml file" name: Create task definition community.aws.ecs_taskdefinition: family: nginx containers: name: nginx essential: true image: nginx portMappings: containerPort: 8080 hostPort: 8080 launch_type: FARGATE cpu: 512 memory: 1024 state: present network_mode: awsvpc ```
Project: KICS (Provisioning / Security & Compliance)
File: 73d59e76-a12c-4b74-a3d8-d3e1e19c25b3.md

title: EKS node group remote access hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 73d59e76-a12c-4b74-a3d8-d3e1e19c25b3 Query name: EKS node group remote access Platform: CloudFormation Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: Ensure Amazon EKS Node group has implict SSH access<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="17" Resources: EKSNodegroup: Type: 'AWS::EKS::Nodegroup' Properties: ClusterName: prod NodeRole: 'arn:aws:iam::012345678910:role/eksInstanceRole' ScalingConfig: MinSize: 3 DesiredSize: 5 MaxSize: 7 Labels: Key1: Value1 Key2: Value2 Subnets: subnet-6782e71e subnet-e7e761ac RemoteAccess: Ec2SshKey: ED25519 ``` ```json title="Positive test num. 2 - json file" hl_lines="21" { "Resources": { "EKSNodegroup": { "Type": "AWS::EKS::Nodegroup", "Properties": { "ClusterName": "prod", "NodeRole": "arn:aws:iam::012345678910:role/eksInstanceRole", "ScalingConfig": { "MinSize": 3, "DesiredSize": 5, "MaxSize": 7 }, "Labels": { "Key1": "Value1", "Key2": "Value2" }, "Subnets": [ "subnet-6782e71e", "subnet-e7e761ac" ], "RemoteAccess": { "Ec2SshKey": "ED25519" } } } } } ``` ```yaml title="Negative test num. 1 - yaml file" Resources: SSHAccessToNodeSG: Type: AWS::EC2::SecurityGroup Properties: VpcId: !Ref VpcId GroupName: !Sub "${Project}-${Environment}-${EKSClusterName}-ssh-access-to-workers-source-sg" GroupDescription: attach this sg to an instance to let it access via ssh to the eks node Tags: Key: Environment Value: !Ref Environment Key: Project Value: !Ref Project EKSNodegroup: Type: 'AWS::EKS::Nodegroup' Properties: ClusterName: prod NodeRole: 'arn:aws:iam::012345678910:role/eksInstanceRole' ScalingConfig: MinSize: 3 DesiredSize: 5 MaxSize: 7 Labels: Key1: Value1 Key2: Value2 Subnets: subnet-6782e71e subnet-e7e761ac RemoteAccess: Ec2SshKey: ED25519 SourceSecurityGroups: !Ref SSHAccessToNodeSG ``` ```json title="Negative test num. 2 - json file" { "Resources": { "SSHAccessToNodeSG": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "VpcId": "VpcId", "GroupName": "${Project}-${Environment}-${EKSClusterName}-ssh-access-to-workers-source-sg", "GroupDescription": "attach this sg to an instance to let it access via ssh to the eks node", "Tags": [ { "Key": "Environment", "Value": "Environment" }, { "Key": "Project", "Value": "Project" } ] } }, "EKSNodegroup": { "Properties": { "RemoteAccess": { "Ec2SshKey": "ED25519", "SourceSecurityGroups": [ "SSHAccessToNodeSG" ] }, "ClusterName": "prod", "NodeRole": "arn:aws:iam::012345678910:role/eksInstanceRole", "ScalingConfig": { "MinSize": 3, "DesiredSize": 5, "MaxSize": 7 }, "Labels": { "Key1": "Value1", "Key2": "Value2" }, "Subnets": [ "subnet-6782e71e", "subnet-e7e761ac" ] }, "Type": "AWS::EKS::Nodegroup" } } } ```
Project: KICS (Provisioning / Security & Compliance)
File: 0b530315-0ea4-497f-b34c-4ff86268f59d.md

title: KMS Key With No Deletion Window hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 0b530315-0ea4-497f-b34c-4ff86268f59d Query name: KMS Key With No Deletion Window Platform: Terraform Severity: <span style="color:#edd57e">Low</span> Category: Observability URL: AWS KMS Key should have a valid deletion window<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1 18" resource "awskmskey" "positive1" { description = "KMS key 1" is_enabled = true enablekeyrotation = true } resource "awskmskey" "positive2" { description = "KMS key 1" is_enabled = true enablekeyrotation = true deletionwindowin_days = 31 } ``` ```tf title="Negative test num. 1 - tf file" resource "awskmskey" "negative1" { description = "KMS key 1" is_enabled = true enablekeyrotation = true deletionwindowin_days = 10 } ```
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_dns_managed_zones.md

+++ title = "googlednsmanaged_zones resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googlednsmanaged_zones" identifier = "inspec/resources/gcp/googlednsmanagedzones.md googlednsmanagedzones resource" parent = "inspec/resources/gcp" +++ A `googlednsmanaged_zones` is used to test a Google ManagedZone resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource ```ruby describe googlednsmanaged_zones(project: 'chef-gcp-inspec') do it { should exist } its('zone_names') { should include 'example-zone' } its('zonednsnames') { should include 'dns-zone-name.com.' } end ``` describe googlednsmanaged_zones(project: 'chef-inspec-gcp') do its('count') { should be <= 100} end describe googlednsmanaged_zones(project: 'chef-inspec-gcp') do its('zone_names') { should include "zone-name" } end googlednsmanagedzones(project: 'chef-inspec-gcp').where(zonename: /^myzone/).zonenames.each do |zonename| describe googlednsmanagedzone(project: 'chef-inspec-gcp', zone: zonename) do it { should exist } end end Properties that can be accessed from the `googlednsmanaged_zones` resource: See the resource for more information. `descriptions` : an array of `googlednsmanaged_zone` description `zonednsnames` : an array of `googlednsmanagedzone` dnsname `dnssec_configs` : an array of `googlednsmanagedzone` dnssecconfig `zone_ids` : an array of `googlednsmanaged_zone` id `zone_names` : an array of `googlednsmanaged_zone` name `name_servers` : an array of `googlednsmanagedzone` nameservers `nameserversets` : an array of `googlednsmanagedzone` nameserver_set `creation_times` : an array of `googlednsmanagedzone` creationtime `labels` : an array of `googlednsmanaged_zone` labels `visibilities` : an array of `googlednsmanaged_zone` visibility `privatevisibilityconfigs` : an array of `googlednsmanagedzone` privatevisibility_config `forwarding_configs` : (Beta only) an array of `googlednsmanagedzone` forwardingconfig `peering_configs` : (Beta only) an array of `googlednsmanagedzone` peeringconfig `reverse_lookups` : (Beta only) an array of `googlednsmanagedzone` reverselookup `servicedirectoryconfigs` : (Beta only) an array of `googlednsmanagedzone` servicedirectory_config This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. Ensure the is enabled for the current project.
Project: StarRocks (App Definition and Development / Database)
File: Data_recovery.md

displayed_sidebar: "English" StarRocks supports data recovery for mistakenly deleted databases/tables/partitions. After `drop table` or `drop database`, StarRocks will not physically delete the data immediately, but keep it in Trash for a period of time (1 day by default). Administrators can recover the mistakenly deleted data with the `RECOVER` command. Syntax: ~~~sql -- 1) Recover database RECOVER DATABASE db_name; -- 2) Restore table RECOVER TABLE [dbname.]tablename; -- 3) Recover partition RECOVER PARTITION partitionname FROM [dbname.]table_name; ~~~ This operation can only restore the deleted meta information. The default time is 1 day, which can be configured by the `catalogtrashexpire_second` parameter in `fe.conf`. If new meta information of the same name and type is created after the meta information is deleted, the previously deleted meta information cannot be restored. Recover the database named `example_db` ~~~sql RECOVER DATABASE example_db; ~~~ 2. Recover the table named `example_tbl` ~~~sql RECOVER TABLE exampledb.exampletbl; ~~~ 3. Recover the partition named `p1` in the table `example_tbl` ~~~sql RECOVER PARTITION p1 FROM example_tbl; ~~~
Project: Akri (Provisioning / Automation & Configuration)
File: GOVERNANCE.md

This document outlines how the Akri project governs itself. The Akri project consists of all of the repositories in the https://github.com/project-akri/ organization. Everyone who interacts with the project must abide by our . The Akri project is in the . Akri has defined three roles that community members can fill. This section defines the expectations and responsibilities of each role and describes how to graduate from one role to another. Community member Maintainer Admin Anyone can be a member of the Akri community! :two_hearts: Here are some ways you can actively engage Add context to an issue Submit a pull request to fix an issue Submit a pull request to add a new feature to Akri such as a new Discovery Handler. See our [contributor guide](https://docs.akri.sh/community/contributing) to get started. Report a bug Create a pull request with a of a way you'd like to extend, modify, or enhance Akri Join our Join the conversation in our Maintainers can review and merge pull requests. The file defines the current maintainers of the project. Beyond maintaining Akri's code, maintainers also: Help drive the for Akri Organize and lead Akri's monthly [community meetings](https://hackmd.io/@akri/S1GKJidJd) Help foster a safe and inclusive environment for all community members and enforce Akri's . Triage issues (add labels, promote discussions, close issues) If a maintainer is no longer interested or cannot perform the maintainer duties listed above, they should volunteer to be moved to emeritus status. Regular contributors can become a maintainer of Akri. If you frequently find yourself doing any combination of commenting on issues, adding thoughts to PRs, contributing PRs, writing proposals, attending community meetings, promoting discussion on Slack, and so on, you may be a great candidate to become a maintainer! Please reach out to one or more -- we may even ask you first! Admins are maintainers with the added ability manage and create new repositories in the `project-akri` organization. Maintainers create the next release when a set of new features and fixes have been completed and the main branch is stable. Akri does not have a fixed release cadence; however, we prefer to release smaller batches of work more often. Akri's [documentation repository](https://github.com/project-akri/akri-docs/tree/main/proposals) creates releases to match Akri's main repository (starting at `v0.6.19`).
Project: YugabyteDB (App Definition and Development / Database)
File: ddl_create_aggregate.md

title: CREATE AGGREGATE statement [YSQL] headerTitle: CREATE AGGREGATE linkTitle: CREATE AGGREGATE description: Use the CREATE AGGREGATE statement to create an aggregate function. menu: v2.18: identifier: ddlcreateaggregate parent: statements type: docs Use the `CREATE AGGREGATE` statement to create an aggregate function. There are three ways to create aggregates. {{%ebnf%}} create_aggregate, createaggregatenormal, createaggregateorder_by, createaggregateold, aggregate_arg, aggregatenormaloption, aggregateorderby_option, aggregateoldoption {{%/ebnf%}} The order of options does not matter. Even the mandatory options `BASETYPE`, `SFUNC`, and `STYPE` may appear in any order. See the semantics of each option in the . Normal syntax example. ```plpgsql yugabyte=# CREATE AGGREGATE sumdouble (float8) ( STYPE = float8, SFUNC = float8pl, MSTYPE = float8, MSFUNC = float8pl, MINVFUNC = float8mi ); yugabyte=# CREATE TABLE normal_table( f float8, i int ); yugabyte=# INSERT INTO normal_table(f, i) VALUES (0.1, 9), (0.9, 1); yugabyte=# SELECT sumdouble(f), sumdouble(i) FROM normal_table; ``` Order by syntax example. ```plpgsql yugabyte=# CREATE AGGREGATE mypercentiledisc(float8 ORDER BY anyelement) ( STYPE = internal, SFUNC = orderedsettransition, FINALFUNC = percentilediscfinal, FINALFUNC_EXTRA = true, FINALFUNCMODIFY = readwrite ); yugabyte=# SELECT mypercentiledisc(0.1), mypercentiledisc(0.9) WITHIN GROUP (ORDER BY typlen) FROM pg_type; ``` Old syntax example. ```plpgsql yugabyte=# CREATE AGGREGATE oldcnt( SFUNC = int8inc, BASETYPE = 'ANY', STYPE = int8, INITCOND = '0' ); yugabyte=# SELECT oldcnt(*) FROM pg_aggregate; ``` Zero-argument aggregate example. ```plpgsql yugabyte=# CREATE AGGREGATE newcnt(*) ( SFUNC = int8inc, STYPE = int8, INITCOND = '0', PARALLEL = SAFE ); yugabyte=# SELECT newcnt(*) FROM pg_aggregate; ```
Project: YugabyteDB (App Definition and Development / Database)
File: 03-select-distinct.md

title: "SELECT DISTINCT" In this exercise we query the orders table and return only the distinct values in the order\id_ column. ``` SELECT DISTINCT order_id FROM orders; ``` The query should return 830 rows In this exercise we query the orders table and return only the distinct values based on combining the specified columns. ``` SELECT DISTINCT order_id, customer_id, employee_id FROM orders; ``` The query should return 830 rows In this exercise we query the orders table and ask to keep just the first row of each group of duplicates. ``` SELECT DISTINCT ON (employeeid)employeeid AS id_number, customer_id FROM orders ORDER BY id_number, customer_id; ``` The query should return 9 rows
Project: YugabyteDB (App Definition and Development / Database)
File: 03-joins.md

title: "Joins" metaTitle: "Joins | YugabyteDB Tutorials" description: "Learn how to use YSQL interface to query data and handle JOINS." type: "COURSE" In this tutorial youll learn how to use YugabyteDBs PostgreSQL-compatible YSQL interface to query data from the Northwind sample database using a variety of JOINs. For detailed information concerning JOINs, please refer to the official . To start, make sure you have all the necessary and have logged into the YSQL shell.fetch **Note:** These instructions last tested with YugabyteDB 1.3 Let's begin!
Project: KubeVela (App Definition and Development / Application Definition & Image Build)
File: alibaba-sls-project.eg.md

```yaml apiVersion: core.oam.dev/v1beta1 kind: Application metadata: name: app-sls-project-sample spec: components: name: sample-sls-project type: alibaba-sls-project properties: name: kubevela-1112 description: "Managed by KubeVela" writeConnectionSecretToRef: name: sls-project-conn ```
Project: Vald (App Definition and Development / Database)
File: tuning-search-performance.md

ANN is fast, but sometimes it can be improved more by tuning parameters. This page shows the essence for improve ANN search by the Vald cluster. When the search results do NOT satisfy the expected result, it can be improved by tuning parameters. First of all, we recommend tuning by following the steps below without doing it blindly. ```mermaid flowchart TD A[Perform Linear Search API] B{Is satisfies?} C[Tuning Parameters to improve precision] D[Tuning Embedding Models] E[Perform Search API] F[Tuning Parameters to improve latency] A-->B B-- Yes -->C B-- No -->D C--> E E--> C E--> F F--> E ``` The best practice is: Measure performance and use it as a baseline for Search API Repeat tuning to improve precision and measure Search API until the conditions are met Repeat tuning to improve latency and measure Search API until the conditions are met <div class="notice"> When the results are not good by Linear Search API, it may need to rethink the embedding model for vectorization. </div> There are two viewpoints, client-side and cluster-side, for improving search performance. <div class="notice"> There is a trade-off between search speed and accuracy, so tuning accuracy at first is recommended. </div> On the client side, parameters of will affect the search result. | | description | how does it affect? | memo | | :- | :- | : | : | | radius | the search radius for NGT<BR> | Define the search range when NGT searches the nearest neighbors | recommended value: `-1` | | epsilon | the search coefficient for NGT<BR> | Expansion factor of the NGT search range.<BR>Search operation time increases when the epsilon is big. | recommended value range: `0.01 ~ 0.3`<BR>default value: `0.1` | | timeout(ns) | max time duration until receiving search results. | An error will be returned if the set `num` search results cannot be obtained within the set time.<BR>By setting `minnum`, the search results will be returned if more than `minnum` can be searched within the time. | default value: `3,000,000,000ns` | On the cluster side, these parameters can be set by `values.yaml`, affect the search result. | | description | how does it affect? | Memo | | : | :-- | :-- | : | | agent.ngt.creationedgesize | Number of nodes connected to one node<BR> | It helps reduce unreachable edges.<BR>The larger it is, the denser the graph structure will be, but the memory usage, search speed, and index construction time will increase accordingly. | default value: `20` | | agent.ngt.searchedgesize | Number of nodes to search from the origin node when searching<BR> | The number of nodes to search will increase.<BR>Accuracy will be higher, but speed will be lower.<BR>Adjust if adjusting the radius and epsilon does not improve the situation. | default value: `10` |
Project: KICS (Provisioning / Security & Compliance)
File: 5e5ecb9d-04b5-4e4f-b5a5-6ee04279b275.md

title: Object Without Required Property (v2) hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 5e5ecb9d-04b5-4e4f-b5a5-6ee04279b275 Query name: Object Without Required Property (v2) Platform: OpenAPI Severity: <span style="color:#5bc0de">Info</span> Category: Structure and Semantics URL: OpenAPI Object should contain all of its required fields<br> ```json title="Positive test num. 1 - json file" hl_lines="3 20" { "swagger": "2.0", "info": { "title": "Simple API Overview" }, "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "description": "200 response" } } } } }, "parameters": { "limitParam": { "name": "limit", "in": "query", "description": "max records to return", "required": true } } } ``` ```yaml title="Positive test num. 2 - yaml file" hl_lines="2 13" swagger: "2.0" info: title: Simple API Overview paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: 200 response parameters: limitParam: name: limit in: query description: max records to return required: true ``` ```json title="Negative test num. 1 - json file" { "swagger": "2.0", "info": { "title": "Simple API Overview", "version": "1.0.0" }, "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "description": "200 response" } } } } }, "parameters": { "limitParam": { "name": "limit", "in": "query", "description": "max records to return", "required": true, "type": "string" } } } ``` ```yaml title="Negative test num. 2 - yaml file" swagger: "2.0" info: title: Simple API Overview version: 1.0.0 paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: 200 response parameters: limitParam: name: limit in: query description: max records to return required: true type: string ```
Project: KICS (Provisioning / Security & Compliance)
File: 37fafbea-dedb-4e0d-852e-d16ee0589326.md

title: Small Activity Log Retention Period hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 37fafbea-dedb-4e0d-852e-d16ee0589326 Query name: Small Activity Log Retention Period Platform: Ansible Severity: <span style="color:#edd57e">Low</span> Category: Observability URL: Ensure that Activity Log Retention is set 365 days or greater<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="20 13 46" name: Create a log profile azurermmonitorlogprofile: name: myProfile location: eastus locations: eastus westus categories: Write Action retention_policy: enabled: False storage_account: resource_group: myResourceGroup name: myStorageAccount register: output name: Create a log profile2 azurermmonitorlogprofile: name: myProfile location: eastus locations: eastus westus categories: Write Action storage_account: resource_group: myResourceGroup name: myStorageAccount register: output name: Create a log profile3 azurermmonitorlogprofile: name: myProfile location: eastus locations: eastus westus categories: Write Action retention_policy: enabled: True days: 50 storage_account: resource_group: myResourceGroup name: myStorageAccount register: output ``` ```yaml title="Negative test num. 1 - yaml file" name: Create a log profile azurermmonitorlogprofile: name: myProfile location: eastus locations: eastus westus categories: Write Action retention_policy: enabled: true days: 380 storage_account: resource_group: myResourceGroup name: myStorageAccount register: output ```
Project: Meshery (Provisioning / Automation & Configuration)
File: linux.md

layout: integration title: Linux subtitle: The easiest way to get a production-grade Kubernetes cluster up and running image: /assets/img/integrations/linux/icons/color/linux-color.svg permalink: extensibility/integrations/linux docURL: https://docs.meshery.io/installation/linux-mac description: integrations-category: Platform integrations-subcategory: Operating System registrant: Artifact Hub components: featureList: [ "Faster and easier configuration", "Application isolation", "Routing Mesh" ] 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