cwielenb/CNCF-Dataset huggingface dataset:
Project: Chef InSpec (Provisioning / Security & Compliance)
File: toml.md

+++ title = "toml resource" draft = false gh_repo = "inspec" platform = "os" [menu] [menu.inspec] title = "toml" identifier = "inspec/resources/os/toml.md toml resource" parent = "inspec/resources/os" +++ Use the `toml` Chef InSpec audit resource to test settings in a TOML file. {{< readfile file="content/inspec/reusable/md/inspec_installation.md" >}} This resource first became available in v1.0.0 of InSpec. An `toml` resource block declares the configuration settings to be tested: ```ruby describe toml('path') do its('setting_name') { should eq 'value' } end ``` where: `'setting_name'` is a setting key defined in the TOML file. `('path')` is the path to the TOML file. `{ should eq 'value' }` is the value that is expected. This resource supports any of the settings listed in a TOML file as properties. In the examples below, the `example.toml` file contains the following data: ```toml port = 8080 fruits = ["apple", "banana", "cantaloupe"] [section] key1 = "value1" ``` Verify the port number: ```ruby describe toml('path/to/example.toml') do its('port') { should eq 8080 } end ``` Verify the value of an array using brackets: ```ruby describe toml('path/to/example.toml') do its(['fruits', 0]) { should eq 'apple' } end ``` Verify the value of a key in a table using brackets: ```ruby describe toml('path/to/example.toml') do its(['section', 'key1']) { should cmp 'value1' } end ``` {{< readfile file="content/inspec/reusable/md/inspecmatcherslink.md" >}}
Project: ClickHouse (App Definition and Development / Database)
File: v23.12.6.19-stable.md

sidebar_position: 1 sidebar_label: 2024 Improve isolation of query cache entries under re-created users or role switches (). Fix possible incorrect result of aggregate function `uniqExact` (). Fix consecutive keys optimization for nullable keys (). Fix string search with const position (). Fix crash in `multiSearchAllPositionsCaseInsensitiveUTF8` for incorrect UTF-8 (). Backported in :. (). Backported in : ... (). Backported in :. (). Backported in : . ().
Project: Trivy (Provisioning / Security & Compliance)
File: trivy_module_uninstall.md

Uninstall a module ``` trivy module uninstall [flags] REPOSITORY ``` ``` -h, --help help for uninstall ``` ``` --cache-dir string cache directory (default "/path/to/cache") -c, --config string config path (default "trivy.yaml") -d, --debug debug mode --enable-modules strings [EXPERIMENTAL] module names to enable --generate-default-config write the default config to trivy-default.yaml --insecure allow insecure server connections --module-dir string specify directory to the wasm modules that will be loaded (default "$HOME/.trivy/modules") -q, --quiet suppress progress bar and log output --timeout duration timeout (default 5m0s) -v, --version show version ``` - Manage modules
Project: StarRocks (App Definition and Development / Database)
File: loading_tools.md

displayed_sidebar: English StarRocks and its ecosystem partners offer the following tools to help you seamlessly integrate StarRocks with external databases. SMT (StarRocks Migration Tool) is a data migration tool provided by StarRocks, designed to optimize complex data loading pipelines: source databases (such as MySQL, Oracle, PostgreSQL) > Flink > destination StarRocks clusters. Its main functions are as follows: Simplifies table creation in StarRocks: Generates statements to create tables in StarRocks based on information from external databases and the target StarRocks cluster. Simplifies the full or incremental data synchronization process in the data pipeline: Generates SQL statements that can be run in Flink's SQL client to submit Flink jobs for synchronizing data. The following flowchart illustrates the process of loading data from the source database MySQL through Flink into StarRocks. DataX is a tool for offline data synchronization, and is open-sourced by Alibaba. DataX can synchronize data between various heterogeneous data sources, including relational databases (MySQL, Oracle, etc.), HDFS, and Hive. DataX provides the StarRocks Writer plugin to synchronize data from data sources supported by DataX to StarRocks. CloudCanal Community Edition is a free data migration and synchronization platform published by that integrates Schema Migration, Full Data Migration, verification, Correction, and real-time Incremental Synchronization. You can directly add StarRocks as a data source in CloudCanal's visual interface and create tasks to automatically migrate or synchronize data from source databases (e.g., MySQL, Oracle, PostgreSQL) to StarRocks. Kettle is an ETL (Extract, Transform, Load) tool with a visual graphical interface, which allows users to build data processing workflows by dragging components and configuring parameters. This intuitive method greatly simplifies the process of data processing and loading, enabling users to handle data more conveniently. Additionally, Kettle provides a rich library of components, allowing users to select suitable components according to their needs and perform various complex data processing tasks. StarRocks offers the Kettle Connector to integrate with Kettle. By combining Kettle's robust data processing and transformation capabilities with StarRocks's high-performance data storage and analytical abilities, more flexible and efficient data processing workflows can be achieved.
Project: Open Policy Agent (OPA) (Provisioning / Security & Compliance)
File: nodejs-express.md

title: NodeJS express labels: category: application layer: network code: https://github.com/build-security/opa-express-middleware inventors: build-security software: nodejsexpress docs_features: rest-api-integration: note: | This project provides a middleware that can query an OPA server for policy decisions. See the project's for a js simple example. Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. OPA can be used to implement authorization policies for APIs used in the express framework.
Project: Meshery (Provisioning / Automation & Configuration)
File: mesheryctl-system-token-view.md

layout: default title: mesheryctl-system-token-view permalink: reference/mesheryctl/system/token/view redirect_from: reference/mesheryctl/system/token/view/ type: reference display-title: "false" language: en command: system subcommand: token View token View a specific token in meshery config <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl system token view [flags] </div> </pre> <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl system token view [token-name] </div> </pre> <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl system token view (show token of current context) </div> </pre> <pre class='codeblock-pre'> <div class='codeblock'> --all set the flag to view all the tokens. -h, --help help for view </div> </pre> <pre class='codeblock-pre'> <div class='codeblock'> --config string path to config file (default "/home/runner/.meshery/config.yaml") -c, --context string (optional) temporarily change the current context. -v, --verbose verbose output -y, --yes (optional) assume yes for user interactive prompts. </div> </pre> Go back to , if you want to add content manually to the CLI documentation, please refer to the for guidance.
Project: Meshery (Provisioning / Automation & Configuration)
File: mesheryctl-version.md

layout: default title: mesheryctl-version permalink: reference/mesheryctl/version redirect_from: reference/mesheryctl/version/ type: reference display-title: "false" language: en command: version subcommand: nil Version of mesheryctl Version of Meshery command line client - mesheryctl. <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl version [flags] </div> </pre> To view the current version and SHA of release binary of mesheryctl client <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl version </div> </pre> <pre class='codeblock-pre'> <div class='codeblock'> -h, --help help for version </div> </pre> <pre class='codeblock-pre'> <div class='codeblock'> --config string path to config file (default "/home/runner/.meshery/config.yaml") -v, --verbose verbose output </div> </pre> Usage of mesheryctl version Go back to , if you want to add content manually to the CLI documentation, please refer to the for guidance.
Project: ClickHouse (App Definition and Development / Database)
File: clusters.md

slug: /en/operations/system-tables/clusters Contains information about clusters available in the config file and the servers in them. Columns: `cluster` () The cluster name. `shard_num` () The shard number in the cluster, starting from 1. `shard_weight` () The relative weight of the shard when writing data. `replica_num` () The replica number in the shard, starting from 1. `host_name` () The host name, as specified in the config. `host_address` () The host IP address obtained from DNS. `port` () The port to use for connecting to the server. `is_local` () Flag that indicates whether the host is local. `user` () The name of the user for connecting to the server. `default_database` () The default database name. `errors_count` () The number of times this host failed to reach replica. `slowdowns_count` () The number of slowdowns that led to changing replica when establishing a connection with hedged requests. `estimatedrecoverytime` () Seconds remaining until the replica error count is zeroed, and it is considered to be back to normal. `databaseshardname` () The name of the `Replicated` database shard (for clusters that belong to a `Replicated` database). `databasereplicaname` () The name of the `Replicated` database replica (for clusters that belong to a `Replicated` database). `is_active` () The status of the `Replicated` database replica (for clusters that belong to a `Replicated` database): 1 means "replica is online", 0 means "replica is offline", `NULL` means "unknown". `name` () - An alias to cluster. Example Query: ```sql SELECT * FROM system.clusters LIMIT 2 FORMAT Vertical; ``` Result: ```text Row 1: cluster: testclustertwo_shards shard_num: 1 shard_weight: 1 replica_num: 1 host_name: 127.0.0.1 host_address: 127.0.0.1 port: 9000 is_local: 1 user: default default_database: errors_count: 0 slowdowns_count: 0 estimatedrecoverytime: 0 databaseshardname: databasereplicaname: is_active: NULL Row 2: cluster: testclustertwo_shards shard_num: 2 shard_weight: 1 replica_num: 1 host_name: 127.0.0.2 host_address: 127.0.0.2 port: 9000 is_local: 0 user: default default_database: errors_count: 0 slowdowns_count: 0 estimatedrecoverytime: 0 databaseshardname: databasereplicaname: is_active: NULL ``` See Also
Project: KICS (Provisioning / Security & Compliance)
File: ca469dd4-c736-448f-8ac1-30a642705e0a.md

title: CPU Requests Not Set hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: ca469dd4-c736-448f-8ac1-30a642705e0a Query name: CPU Requests Not Set Platform: Kubernetes Severity: <span style="color:#edd57e">Low</span> Category: Resource Management URL: CPU requests should be set to ensure the sum of the resource requests of the scheduled Containers is less than the capacity of the node<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="17 10 34 41" apiVersion: v1 kind: Pod metadata: name: frontend spec: containers: name: app image: images.my-company.example/app:v4 resources: requests: memory: "64Mi" limits: memory: "128Mi" cpu: "500m" name: log-aggregator image: images.my-company.example/log-aggregator:v6 resources: limits: memory: "128Mi" cpu: "500m" apiVersion: serving.knative.dev/v1 kind: Configuration metadata: name: dummy-config namespace: knative-sequence spec: template: spec: containers: name: app image: images.my-company.example/app:v4 resources: requests: memory: "64Mi" limits: memory: "128Mi" cpu: "500m" name: log-aggregator image: images.my-company.example/log-aggregator:v6 resources: limits: memory: "128Mi" cpu: "500m" ``` ```yaml title="Negative test num. 1 - yaml file" apiVersion: v1 kind: Pod metadata: name: frontend spec: containers: name: app image: images.my-company.example/app:v4 resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" name: log-aggregator image: images.my-company.example/log-aggregator:v6 resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" apiVersion: serving.knative.dev/v1 kind: Configuration metadata: name: dummy-config namespace: knative-sequence spec: template: spec: containers: name: app image: images.my-company.example/app:v4 resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" name: log-aggregator image: images.my-company.example/log-aggregator:v6 resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" ```
Project: StarRocks (App Definition and Development / Database)
File: days_diff.md

displayed_sidebar: "English" Returns the day difference between two date expressions (`expr1` `expr2`), accurate to the day. Difference between days_diff and : |Function|Behavior|Example| |||| |daysdiff| The calculation is accurate to the second and rounded down to the nearest integer.|daysdiff between '2020-12-25 23:00:00' and '2020-12-24 23:00:01' is 0.| |datediff| The calculation is accurate to the day. |datediff between '2020-12-25 23:00:00' and '2020-12-24 23:00:01' is 1.| ```Haskell BIGINT days_diff(DATETIME expr1,DATETIME expr2); ``` `expr1`: the end time. It must be of the DATETIME or DATE type. `expr2`: the start time. It must be of the DATETIME or DATE type. Returns a BIGINT value. NULL is returned if the date does not exist, for example, 2022-02-29. days_diff() takes the hour, minute, and second parts into calculation. If the difference is less than 1 day, 0 is returned. ```Plain select days_diff('2010-11-30 23:00:00', '2010-11-29 23:00:00') ++ | days_diff('2010-11-30 23:00:00', '2010-11-29 23:00:00') | ++ | 1 | ++ select days_diff('2010-11-30 23:00:00', '2010-11-29 23:10:00') ++ | days_diff('2010-11-30 23:00:00', '2010-11-29 23:10:00') | ++ | 0 | ++ ```
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: ml-linear-methods.md

layout: global title: Linear methods displayTitle: Linear methods 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. > This section has been moved into the .
Project: Beam (App Definition and Development / Streaming & Messaging)
File: 10_basic_metrics.md

Prompt: What are the metrics in Apache Beam? Response: In the Apache Beam model, provide insights into the current state of your pipeline, including during pipeline execution. Metrics are named and scoped to a specific step in the pipeline. They can be created dynamically during pipeline execution. If a runner doesn't support some part of reporting metrics, the fallback behavior is to drop the metric updates rather than fail the pipeline. Beam provides a number of : Counters Distributions Gauges To declare a metric, use the `beam.metrics.Metrics` class. For example: ```python self.wordscounter = Metrics.counter(self.class_, 'words') self.wordlengthscounter = Metrics.counter(self.class, 'word_lengths') self.wordlengthsdist = Metrics.distribution(self.class, 'wordlendist') self.emptylinecounter = Metrics.counter(self.class, 'empty_lines') ``` For implementation details, see the . You can export metrics to external sinks. Spark and Flink runners support REST HTTP and Graphite.
Project: YugabyteDB (App Definition and Development / Database)
File: dml_update.md

title: UPDATE statement [YSQL] headerTitle: UPDATE linkTitle: UPDATE description: Use UPDATE to modify values of specified columns in all rows that meet certain conditions. When conditions are not provided in WHERE clause, all rows update. menu: v2.18: identifier: dml_update parent: statements type: docs Use the `UPDATE` statement to modify the values of specified columns in all rows that meet certain conditions, and when conditions are not provided in WHERE clause, all rows are updated. `UPDATE` outputs the number of rows that are being updated. {{%ebnf%}} update, returning_clause, update_item, column_values, column_names {{%/ebnf%}} {{< note title="Table inheritance is not yet supported" >}} The rule specifies syntax that is useful only when at least one other table inherits one of the tables that the `truncate` statement lists explicitly. See for more detail. Until inheritance is supported, use a bare . {{< /note >}} See the section for more information about the semantics of the `commontableexpression` grammar rule. Updating columns that are part of an index key including PRIMARY KEY is not yet supported. While the `WHERE` clause allows a wide range of operators, the exact conditions used in the where clause have significant performance considerations (especially for large datasets). For the best performance, use a `WHERE` clause that provides values for all columns in `PRIMARY KEY` or `INDEX KEY`. Specify the subqueries that are referenced by name in the `UPDATE` statement. Specify the name of the table to be updated. Specify the identifier of the target table within the `UPDATE` statement. When an alias is specified, it must be used in place of the actual table in the statement. Specify the column in the table to be updated. Specify the value to be assigned to a column. When the expression is referencing a column, the old value of this column is used to evaluate. Specify the value to be returned. When the `output_expression` is referencing a column, the new value of this column (updated value) is used to evaluate. Specify the SELECT subquery statement. Its selected values will be assigned to the specified columns. Create a sample table, insert a few rows, then update the inserted rows. ```plpgsql yugabyte=# CREATE TABLE sample(k1 int, k2 int, v1 int, v2 text, PRIMARY KEY (k1, k2)); ``` ```plpgsql yugabyte=# INSERT INTO sample VALUES (1, 2.0, 3, 'a'), (2, 3.0, 4, 'b'), (3, 4.0, 5, 'c'); ``` ```plpgsql yugabyte=# SELECT * FROM sample ORDER BY k1; ``` ``` k1 | k2 | v1 | v2 -+-+-+- 1 | 2 | 3 | a 2 | 3 | 4 | b 3 | 4 | 5 | c (3 rows) ``` ```plpgsql yugabyte=# UPDATE sample SET v1 = v1 + 3, v2 = '7' WHERE k1 = 2 AND k2 = 3; ``` ``` UPDATE 1 ``` ```plpgsql yugabyte=# SELECT * FROM sample ORDER BY k1; ``` ``` k1 | k2 | v1 | v2 -+-+-+- 1 | 2 | 3 | a 2 | 3 | 7 | 7 3 | 4 | 5 | c (2 rows) ```
Project: KICS (Provisioning / Security & Compliance)
File: e840c54a-7a4c-405f-b8c1-c49a54b87d11.md

title: Nifcloud NAS Undefined Description To NAS Security Group hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: e840c54a-7a4c-405f-b8c1-c49a54b87d11 Query name: Nifcloud NAS Undefined Description To NAS Security Group Platform: Terraform Severity: <span style="color:#edd57e">Low</span> Category: Networking and Firewall URL: Missing description for nas security group<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "nifcloudnassecurity_group" "positive" { group_name = "app" } ``` ```tf title="Negative test num. 1 - tf file" resource "nifcloudnassecurity_group" "negative" { group_name = "app" description = "Allow from app traffic" } ```
Project: KICS (Provisioning / Security & Compliance)
File: 81ce9394-013d-4731-8fcc-9d229b474073.md

title: CS Kubernetes Node Pool Auto Repair Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 81ce9394-013d-4731-8fcc-9d229b474073 Query name: CS Kubernetes Node Pool Auto Repair Disabled Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Insecure Configurations URL: Verifies if Alicloud Container Service Node Pool Auto Repair is Enabled. This service periodically checks for failing nodes and repairs them to ensure a smooth running state.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "alicloudcskubernetesnodepool" "default2" { name = var.name clusterid = alicloudcsmanagedkubernetes.default.0.id vswitchids = [alicloudvswitch.default.id] instancetypes = [data.alicloudinstancetypes.default.instancetypes.0.id] systemdiskcategory = "cloud_efficiency" systemdisksize = 40 keyname = alicloudkeypair.default.keyname desired_size = 1 } ``` ```tf title="Positive test num. 2 - tf file" hl_lines="17" resource "alicloudcskubernetesnodepool" "default3" { name = var.name clusterid = alicloudcsmanagedkubernetes.default.0.id vswitchids = [alicloudvswitch.default.id] instancetypes = [data.alicloudinstancetypes.default.instancetypes.0.id] systemdiskcategory = "cloud_efficiency" systemdisksize = 40 keyname = alicloudkeypair.default.keyname desired_size = 1 management { auto_repair = false auto_upgrade = true surge = 1 max_unavailable = 1 } } ``` ```tf title="Positive test num. 3 - tf file" hl_lines="16" resource "alicloudcskubernetesnodepool" "default4" { name = var.name clusterid = alicloudcsmanagedkubernetes.default.0.id vswitchids = [alicloudvswitch.default.id] instancetypes = [data.alicloudinstancetypes.default.instancetypes.0.id] systemdiskcategory = "cloud_efficiency" systemdisksize = 40 keyname = alicloudkeypair.default.keyname desired_size = 1 management { auto_upgrade = true surge = 1 max_unavailable = 1 } } ``` ```tf title="Negative test num. 1 - tf file" resource "alicloudcskubernetesnodepool" "default1" { name = var.name clusterid = alicloudcsmanagedkubernetes.default.0.id vswitchids = [alicloudvswitch.default.id] instancetypes = [data.alicloudinstancetypes.default.instancetypes.0.id] systemdiskcategory = "cloud_efficiency" systemdisksize = 40 keyname = alicloudkeypair.default.keyname desired_size = 1 management { auto_repair = true auto_upgrade = true surge = 1 max_unavailable = 1 } } ```