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

+++ title = "port resource" draft = false gh_repo = "inspec" platform = "os" [menu] [menu.inspec] title = "port" identifier = "inspec/resources/os/port.md port resource" parent = "inspec/resources/os" +++ Use the `port` Chef InSpec audit resource to test basic port properties, such as port, process, if it's listening. {{< readfile file="content/inspec/reusable/md/inspec_installation.md" >}} This resource first became available in v1.0.0 of InSpec. A `port` resource block declares a port, and then depending on what needs to be tested, a process, protocol, process identifier, and its state (is it listening?): describe port(514) do it { should be_listening } its('processes') {should include 'syslog'} end where the `processes` returns the processes listening on port 514. A filter may specify an attribute: describe port.where { protocol =~ /tcp/ && port > 22 && port < 80 } do it { shouldnot belistening } end where `.where{}` specifies a block in which one (or more) attributes`port`, `address`, `protocol`, `process`, `pid`, or `listening?`-scope the test to ports that match those attributes For example, to test if the SSH daemon is available on a Linux machine via the default port (22): describe port(22) do its('processes') { should include 'sshd' } its('protocols') { should include 'tcp' } its('addresses') { should include '0.0.0.0' } end The `addresses` property tests if the specified address is associated with a port: its('addresses') { should include '0.0.0.0' } The `be_listening` property tests if the port is listening for traffic: it { should be_listening } The `pids` property tests the process identifiers (PIDs): its('pids') { should cmp 27808 } The `processes` property tests if the named process is running on the system: its('processes') { should cmp 'syslog' } The `protocols` property tests the Internet protocol: ICMP (`'icmp'`), TCP (`'tcp'` or `'tcp6'`), or UDP (`'udp'` or `'udp6'`): its('protocols') { should include 'tcp' } or for the IPv6 protocol: its('protocols') { should include 'tcp6' } The following examples show how to use this Chef InSpec audit resource. describe port(80) do it { should be_listening } its('protocols') { should cmp 'tcp' } end A specific port address may be checked using either of the following examples: describe port(80) do it { should be_listening } its('addresses') {should include '0.0.0.0'} end or: describe port('0.0.0.0', 80) do it { should be_listening } end describe port(80) do it { should be_listening } its('protocols') { should cmp 'tcp6' } end describe port(80) do it { shouldnot belistening } end describe port(443) do it { should be_listening } its('protocols') { should cmp 'tcp' } end describe port(22) do it { should be_listening } its('protocols') { should include('tcp') } its('protocols') { should_not include('udp') } end describe port(65432) do it { shouldnot belistening } end {{< readfile file="content/inspec/reusable/md/inspecmatcherslink.md" >}}
Project: KICS (Provisioning / Security & Compliance)
File: 15d8a7fd-465a-4d15-a868-add86552f17b.md

title: GitHub Repository Set To Public hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 15d8a7fd-465a-4d15-a868-add86552f17b Query name: GitHub Repository Set To Public Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Insecure Configurations URL: Repositories must be set to private, which means the attribute 'visibility' must be set to 'private' and/or the attribute 'private' must be set to true (the attribute 'visibility' overrides 'private')<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1 28 15" resource "github_repository" "positive1" { name = "example" description = "My awesome codebase" template { owner = "github" repository = "terraform-module-template" } } resource "github_repository" "positive2" { name = "example" description = "My awesome codebase" private = false template { owner = "github" repository = "terraform-module-template" } } resource "github_repository" "positive3" { name = "example" description = "My awesome codebase" private = true visibility = "public" template { owner = "github" repository = "terraform-module-template" } } ``` ```tf title="Negative test num. 1 - tf file" resource "github_repository" "negative1" { name = "example" description = "My awesome codebase" private = true template { owner = "github" repository = "terraform-module-template" } } ```
Project: YugabyteDB (App Definition and Development / Database)
File: cr-do-cume-dist.md

title: crdocume_dist.sql linkTitle: crdocume_dist.sql headerTitle: crdocume_dist.sql description: crdocume_dist.sql - Part of the code kit for the "Analyzing a normal distribution" section within the YSQL window functions documentation. menu: v2.18: identifier: cr-do-cume-dist parent: analyzing-a-normal-distribution weight: 130 type: docs Save this script as `crdocume_dist.sql`. ```plpgsql create or replace procedure documedist(noofbuckets in int) language sql as $body$ insert into results(method, bucket, n, mins, maxs) with measures as ( select score, (cume_dist() over w) as measure from t4_view window w as (order by score)) , bucket as ( select bucket(measure::numeric, 0::numeric, 1::numeric, $1) as bucket, score from measures) select 'cume_dist', bucket, count(*), min(score), max(score) from bucket group by bucket; $body$; ```
Project: Kui (App Definition and Development / Application Definition & Image Build)
File: kui_shell_core.SourceRef.md

/ / SourceRef .SourceRef `Optional` customization: `Object` | Name | Type | | : | :- | | `data` | `string` | | `filepath` | `string` | | `isFor` | `string` | templates: { `contentType?`: `string` ; `data`: `string` ; `filepath`: `string` ; `isFor`: `string` ; `kind?`: `"source"` \| `"template"` }[]
Project: KubeDL (Provisioning / Automation & Configuration)
File: bug-report.md

name: Bug Report about: Create a report to help us improve title: "[BUG]" labels: '' assignees: SimonCqk <!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!--> What happened: What you expected to happen: How to reproduce it: Anything else we need to know?: Environment: KubeDL version: Kubernetes version (use `kubectl version`): OS (e.g: `cat /etc/os-release`): Kernel (e.g. `uname -a`): Install tools: Others:
Project: ArangoDB (App Definition and Development / Database)
File: template.md

+++ title = "Constrained template macros" +++ Overridable: All of the following macros are overridable, define before inclusion. Header: `<boost/outcome/config.hpp>` These macros expand into either the syntax for directly specifying constrained templates in C++ 20, or into a SFINAE based emulation for earlier C++ versions. Form of usage looks as follows: ```c++ BOOSTOUTCOMETEMPLATE(class ErrorCondEnum) BOOSTOUTCOMETREQUIRES( // If this is a valid expression BOOSTOUTCOMETEXPR(errortype(makeerror_code(ErrorCondEnum()))), // If this predicate is true BOOSTOUTCOMETPRED(predicate::template enableerrorconditionconvertingconstructor<ErrorCondEnum>) // Any additional requirements follow here ... ) constexpr basicresult(ErrorCondEnum &&t, errorconditionconvertingconstructor_tag /unused/ = {}); ``` Be aware that slightly different semantics occur for real C++ 20 constrained templates than for the SFINAE emulation. <a name="template"></a>`BOOSTOUTCOMETEMPLATE(template args ...)` Begins a constrained template declaration. <a name="trequires"></a>`BOOSTOUTCOMETREQUIRES(requirements ...)` Specifies the requirements for the constrained template to be available for selection by the compiler. <a name="texpr"></a>`BOOSTOUTCOMETEXPR(expression)` A requirement that the given expression is valid. <a name="tpred"></a>`BOOSTOUTCOMETPRED(boolean)` A requirement that the given constant time expression is true.
Project: Flink (App Definition and Development / Streaming & Messaging)
File: limit.md

title: "LIMIT clause" weight: 13 type: docs <!-- 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. --> {{< label Batch >}} `LIMIT` clause constrains the number of rows returned by the `SELECT` statement. In general, this clause is used in conjunction with ORDER BY to ensure that the results are deterministic. The following example selects the first 3 rows in `Orders` table. ```sql SELECT * FROM Orders ORDER BY orderTime LIMIT 3 ``` {{< top >}}
Project: Meshery (Provisioning / Automation & Configuration)
File: mesheryctl-system-status.md

layout: default title: mesheryctl-system-status permalink: reference/mesheryctl/system/status redirect_from: reference/mesheryctl/system/status/ type: reference display-title: "false" language: en command: system subcommand: status Check Meshery status Check status of Meshery and Meshery components. <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl system status [flags] </div> </pre> Check status of Meshery, Meshery adapters, Meshery Operator and its controllers. <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl system status </div> </pre> (optional) Extra data in status table <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl system status --verbose </div> </pre> <pre class='codeblock-pre'> <div class='codeblock'> -h, --help help for status -v, --verbose (optional) Extra data in status table </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. -y, --yes (optional) assume yes for user interactive prompts. </div> </pre> Usage of mesheryctl system status Go back to , if you want to add content manually to the CLI documentation, please refer to the for guidance.
Project: KubeArmor (Provisioning / Security & Compliance)
File: consideration_in_policy_action.md

While operators can define security policies with an action \(either Block or Allow\), KubeArmor may handle those policies differently \(blacklist vs. whitelist\). If the actions of all security policies for a container are 'Block', then these policies are handled in a blacklist manner. However, if at least one security policy's action is 'Allow', then all security policies for a container are handled in a whitelist manner, meaning that some security policies may be handled differently in containers. Here, we introduce an example of how security policies are handled differently. There are two pods: pod A with \(grp=1, role=A\) and pod B with \(grp=1, role=B\). Let us say that an operator wants to block the execution of a bash shell in those pods, so the operator first defines a policy with \(selector grp=1, process /bin/bash, action block\). Then, /bin/bash cannot be executed in the pods while some other applications are still executable \(blacklist\). After that, let us say that the operator also wants the pods with role=A to execute /app only. Then, this policy will be enforced into Pod A. At this point, a problem may occur. Since Pod A has an 'Allow' policy and a 'Block' policy together, the way to handle those policies is changed from a blacklist manner to a whitelist manner, which means that Pod A will be only able to execute /app. Here, if Pod A needs to only run /app, then everything will be fine. However, what if Pod A had to implicitly execute some other applications \(e.g., /agent\)? Then, there will be a severe problem since all applications except for /app will be blocked in Pod A.
Project: DevStream (Provisioning / Automation & Configuration)
File: CONTRIBUTING.md

Welcome to DevStream! Thanks for contributing, and thanks for reading this doc before doing it! The contains information about how to get started, how the community organizes, and more. See the followings for more details before you decide to contribute: . , and other docs under the "Developer Guide" section. Those guidelines, as the name suggests, are only guidelines, not rules. So, use your best judgment, and feel free to propose changes to the contribute/development docs.
Project: Pulsar (App Definition and Development / Streaming & Messaging)
File: pip-339.md

The `--log-topic` option already exists in Pulsar Functions, enabling users to direct function logs to a specified "log topic". This feature is useful for debugging and analysis. However, Pulsar Sinks and Sources currently lack this option, resulting in inconsistent log management across Pulsar Functions and Connectors. The primary objective of this proposal is to integrate the `--log-topic` option into the create, update, and localrun sub-commands for Pulsar Sinks and Sources. Integrate the `--log-topic` option into `SinkDetailsCommand` and `SourceDetailsCommand`: ```java @Parameter(names = "--log-topic", description = "The topic to which the logs of a Pulsar Sink/Source are produced") protected String logTopic; ``` Pass this option to `functionDetailsBuilder` when creating, updating, or locally running Pulsar Sinks and Sources: ```java if (sinkConfig.getLogTopic() != null) { functionDetailsBuilder.setLogTopic(sinkConfig.getLogTopic()); } ``` ```java if (sourceConfig.getLogTopic() != null) { functionDetailsBuilder.setLogTopic(sourceConfig.getLogTopic()); } ``` Return the "log topic" when getting Pulsar Sinks and Sources ```java if (!isEmpty(functionDetails.getLogTopic())) { sinkConfig.setLogTopic(functionDetails.getLogTopic()); } ``` ```java if (!isEmpty(functionDetails.getLogTopic())) { sourceConfig.setLogTopic(functionDetails.getLogTopic()); } ``` Upon successful implementation of this proposal, the create, update, and localrun sub-commands for Pulsar Sinks and Sources will include the --log-topic option. Mailing List discussion thread: https://lists.apache.org/thread/8h6f8jcgs0cvvj96318zvcr18zs9513t Mailing List voting thread: https://lists.apache.org/thread/00682h05r4mh1plk10s6qq90p2s2xo74
Project: RabbitMQ (App Definition and Development / Streaming & Messaging)
File: 3.10.21.md

RabbitMQ `3.10.21` is a maintenance release in the `3.10.x` . This series . Please refer to the upgrade section from if upgrading from a version prior to 3.10.0. This release requires Erlang 24.3 and supports Erlang 25. has more details on Erlang version requirements for RabbitMQ. Erlang 23 and 24 versions older than 24.3 have reached . This release of RabbitMQ or later versions. Nodes will fail to start on older Erlang releases. Erlang 25.3 is recommended: it offers much improved performance on ARM64 architectures, across all architectures, and the most recent TLS 1.3 implementation. Release notes can be found on GitHub at . It was impossible to return to a tab that had a filter expression that was not a valid regular expressions. Now such expressions will be used as regular text filters. GitHub issue: The authorization backend could run into an exception when used in combination with other backends. GitHub issue: None in this release. To obtain source code of the entire distribution, please download the archive named `rabbitmq-server-3.10.21.tar.xz` instead of the source tarball produced by GitHub.
Project: KubeDB by AppsCode (App Definition and Development / Database)
File: kubectl-dba_data_drop_mariadb.md

title: Kubectl-Dba Data Drop Mariadb menu: docs_{{ .version }}: identifier: kubectl-dba-data-drop-mariadb name: Kubectl-Dba Data Drop Mariadb parent: reference-cli menuname: docs{{ .version }} sectionmenuid: reference Drop data from MariaDB Use this cmd to drop data from a mongodb ``` kubectl-dba data drop mariadb [flags] ``` ``` kubectl dba data drop mariadb -n demo sample-mariadb ``` ``` -h, --help help for mariadb ``` ``` --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. --as-uid string UID to impersonate for the operation. --cache-dir string Default cache directory (default "/home/runner/.kube/cache") --certificate-authority string Path to a cert file for the certificate authority --client-certificate string Path to a client certificate file for TLS --client-key string Path to a client key file for TLS --cluster string The name of the kubeconfig cluster to use --context string The name of the kubeconfig context to use --default-seccomp-profile-type string Default seccomp profile --disable-compression If true, opt-out of response compression for all requests to the server --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure --kubeconfig string Path to the kubeconfig file to use for CLI requests. --match-server-version Require server version to match client version -n, --namespace string If present, the namespace scope for this CLI request --password string Password for basic authentication to the API server --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") -s, --server string The address and port of the Kubernetes API server --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used --token string Bearer token for authentication to the API server --user string The name of the kubeconfig user to use --username string Username for basic authentication to the API server ``` - Drop data from a database
Project: Pulsar (App Definition and Development / Streaming & Messaging)
File: pip-279.md

reformat property,for a http header name cannot contain the following prohibited characters: =,;: \t\r\n\v\f for example: {"city=shanghai":"tag"} when we run `bin/pulsar-admin topics get-message-by-id `, it will throw exception, the exception is: `Reason: java.util.concurrent.CompletionException: org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException: Could not complete the operation. Number of retries has been exhausted. Failed reason: a header name cannot contain the following prohibited characters: =,;: \t\r\n\v\f: =` In master branch, in an http request:getMessageById("/{tenant}/{namespace}/{topic}/ledger/{ledgerId}/entry/{entryId}"), replace `"X-Pulsar-PROPERTY-" + msgProperties.getKey()` with `"X-Pulsar-PROPERTY"` After release-3.1.0, this feature begins to take effect. for example, the current message's properties likes this: ``` "name": "James" "gender": "man" "details=man": "good at playing basketball" ``` old response header format: ``` headers: { "X-Pulsar-PROPERTY-name": "James", "X-Pulsar-PROPERTY-gender": "man", "X-Pulsar-PROPERTY-details=man": "good at playing basketball" } ``` but it will throw exception in the end check new response header format: ``` headers: { "X-Pulsar-PROPERTY": '{"name": "James", "gender": "man", "details=man": "good at playing basketball"}' } ``` <!-- Updated afterwards --> Mailing List discussion thread: https://lists.apache.org/thread/vfc99mbj2z2xgwfs1hq1zxrow13qm2n7 Mailing List voting thread: https://lists.apache.org/thread/g354684m9h495o3p0kmzb7fh7vfxhddx
Project: KUDO (App Definition and Development / Application Definition & Image Build)
File: enhancement-request.md

name: Enhancement Request about: Suggest an enhancement to the KUDO project title: '' labels: kind/enhancement assignees: '' <!-- Please only use this template for submitting enhancement requests. Implementing your enhancement will follow the KEP process: https://github.com/kudobuilder/kudo/blob/main/keps/0001-kep-process.md --> What would you like to be added: Why is this needed:
Project: Harbor (Provisioning / Container Registry)
File: 10-11-User-fix-vulnerability.md

10-07 user fix vulnerability ======= To test trivy scan image vulnerability correct after user fix it. User guide. This test requires that one Harbor instance is running and available. Harbor is installed with trivy enable. A Linux host with Docker client installed. Trivy has been updated to the latest. Login Harbor as admin. Push some images with vulnerability. Scan an image with vulnerability and record the result. Upgrade the image to fix vulnerability. Rescan the same image and check the result. Step5 number of vulnerability should less than step3. None
Project: KICS (Provisioning / Security & Compliance)
File: f3674e0c-f6be-43fa-b71c-bf346d1aed99.md

title: Sagemaker Notebook Instance Without KMS hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: f3674e0c-f6be-43fa-b71c-bf346d1aed99 Query name: Sagemaker Notebook Instance Without KMS Platform: Terraform Severity: <span style="color:#bb2124">High</span> Category: Encryption URL: AWS SageMaker should encrypt model artifacts at rest using Amazon S3 server-side encryption with an AWS KMS<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "awssagemakernotebook_instance" "ni" { name = "my-notebook-instance" rolearn = awsiam_role.role.arn instance_type = "ml.t2.medium" tags = { Name = "foo" } } ``` ```tf title="Negative test num. 1 - tf file" resource "awssagemakernotebook_instance" "ni" { name = "my-notebook-instance" rolearn = awsiam_role.role.arn instance_type = "ml.t2.medium" kmskeyid = "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" tags = { Name = "foo" } } ```
Project: YugabyteDB (App Definition and Development / Database)
File: create_table,table_elem,column_constraint,table_constraint,key_columns,hash_columns,range_columns,storage_parameters,storage_parameter,index_parameters,references_clause,split_row.grammar.md

```output.ebnf create_table ::= CREATE [ TEMPORARY | TEMP ] TABLE [ IF NOT EXISTS ] tablename ( [ tableelem [ , ... ] ] ) [ WITH ( { COLOCATED = { 'true' | 'false' } | storage_parameters } ) | WITHOUT OIDS ] [ TABLESPACE tablespace_name ] [ SPLIT { INTO integer TABLETS | AT VALUES ( split_row [ , ... ] ) } ] tableelem ::= columnname datatype [ columnconstraint [ ... ] ] | table_constraint columnconstraint ::= [ CONSTRAINT constraintname ] { NOT NULL | NULL | CHECK ( expression ) | DEFAULT expression | UNIQUE index_parameters | PRIMARY KEY | references_clause } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] tableconstraint ::= [ CONSTRAINT constraintname ] { CHECK ( expression ) | UNIQUE ( columnnames ) indexparameters | PRIMARY KEY ( key_columns ) | FOREIGN KEY ( column_names ) references_clause } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] keycolumns ::= hashcolumns [ , rangecolumns ] | rangecolumns hashcolumns ::= columnname [ HASH ] | ( column_name [ , ... ] ) HASH rangecolumns ::= { columnname { ASC | DESC } } [ , ... ] storageparameters ::= storageparameter [ , ... ] storageparameter ::= paramname [ = param_value ] indexparameters ::= [ INCLUDE ( columnnames ) ] [ WITH ( storage_parameters ) ] [ USING INDEX TABLESPACE tablespace_name ] referencesclause ::= REFERENCES tablename [ column_name [ , ... ] ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE key_action ] [ ON UPDATE key_action ] splitrow ::= ( columnvalue [ , ... ] ) ```