cwielenb/CNCF-Dataset huggingface dataset:
Project: StarRocks (App Definition and Development / Database)
File: week.md

displayed_sidebar: "English" Returns the week number for a given date. This function works in the same way as the WEEK function in MySQL. This function is supported from v2.3. ```Haskell INT WEEK(DATETIME|DATE date, INT mode) ``` `Date`: The supported data types are DATETIME and DATE. `Mode`: optional. The supported data type is INT. This parameter is used to specify the logic for calculating the week number, that is, whether the week starts on Sunday or Monday, and whether the return value is in the range of 053 or 153. Value range: 07. Default value: `0`. If this parameter is not specified, mode `0` is used by default. The following table describes how this parameter works. | Mode | First day of week | Range | Week 1 is the first week | | : | :- | :- | :- | | 0 | Sunday | 0-53 | with a Sunday in this year | | 1 | Monday | 0-53 | with 4 or more days this year | | 2 | Sunday | 1-53 | with a Sunday in this year | | 3 | Monday | 1-53 | with 4 or more days this year | | 4 | Sunday | 0-53 | with 4 or more days this year | | 5 | Monday | 0-53 | with a Monday in this year | | 6 | Sunday | 1-53 | with 4 or more days this year | | 7 | Monday | 1-53 | with a Monday in this year | Returns a value of the INT type. Value range: 053. The specific range is determined based on the `mode` parameter. `NULL` is returned if the value of `date` is invalid or the input value is empty. Calculate the week number for `2007-01-01`. `2007-01-01` is Monday on the calendar. `Mode` is set to `0` and `0` is returned. The week starts on Sunday. `2007-01-01` is Monday and cannot be week 1. Therefore, `0` is returned. ```Plaintext mysql> SELECT WEEK('2007-01-01', 0); +--+ | week('2007-01-01', 0) | +--+ | 0 | +--+ 1 row in set (0.02 sec) ``` `Mode` is set to `1` and `1` is returned. The week starts on Monday and `2007-01-01` is Monday. ```Plaintext mysql> SELECT WEEK('2007-01-01', 1); +--+ | week('2007-01-01', 1) | +--+ | 1 | +--+ 1 row in set (0.02 sec) ``` `Mode` is set to `2` and `53` is returned. The week starts on Sunday. However, `2007-01-01` is Monday and the value range is 153. Therefore, `53` is returned, indicating that this is the last week of the previous year. ```Plaintext mysql> SELECT WEEK('2007-01-01', 2); +--+ | week('2007-01-01', 2) | +--+ | 53 | +--+ 1 row in set (0.01 sec) ```
Project: Kui (App Definition and Development / Application Definition & Image Build)
File: kui_shell_core.ResourceByReference.md

/ / ResourceByReference .ResourceByReference Entity with a "resource" field that is MetadataBearing | Name | Type | | :-- | :-- | | `Content` | `void` | <`Content`\> `ResourceByReference` `Optional` apiVersion: `string` . `Optional` content: `Content` . `Optional` contentType: `string` . `Optional` kind: `string` . `Optional` metadata: `Object` | Name | Type | | :- | :- | | `creationTimestamp?` | `string` | | `generation?` | `string` | | `labels?` | `Record`<`string`, `string`\> | | `name` | `string` | | `namespace?` | `string` | . `Optional` nameHash: `string` . `Optional` onclick: `Object` family of onclick handlers | Name | Type | | :-- | :- | | `kind?` | `string` | | `name?` | `string` | | `nameHash?` | `string` | | `namespace?` | `string` | . `Optional` presentation: . `Optional` prettyName: `string` name hash, e.g. the hash part of auto-generated names, or an openwhisk activation id . resource: <`Content`\> `Optional` toolbarText: . `Optional` version: `string` optional designation of resource version .
Project: ShardingSphere (App Definition and Development / Database)
File: shardingsphere-proxy-quick-start.en.md

+++ pre = "<b>2.2. </b>" title = "ShardingSphere-Proxy" weight = 2 +++ ShardingSphere-Proxy is positioned as a transparent database proxy. It theoretically supports any client operation data using MySQL, PostgreSQL and openGauss protocols, and is friendly to heterogeneous languages and operation and maintenance scenarios. Proxy provides limited support for system databases / tables (such as informationschema, pgcatalog). When connecting to Proxy through some graph database clients, the client or proxy may have an error prompt. You can use command-line clients (`mysql`, `psql`, `gsql`, etc.) to connect to the Proxy's authentication function. Starting ShardingSphere-Proxy with Docker requires no additional dependency. To start the Proxy using binary distribution, the environment must have Java JRE 8 or higher. Get ShardingSphere-Proxy. ShardingSphere-Proxy is available at: Rule configuration. Edit `%SHARDINGSPHEREPROXYHOME%/conf/global.yaml`. Edit `%SHARDINGSPHEREPROXYHOME%/conf/database-xxx.yaml`. %SHARDINGSPHEREPROXYHOME% is the proxy extract path. for example: `/opt/shardingsphere-proxy-bin/` Please refer to for more details. Import dependencies. If the backend database is PostgreSQL or openGauss, no additional dependencies are required. If the backend database is MySQL, please download or and put it into the `%SHARDINGSPHEREPROXYHOME%/ext-lib` directory. Start server. Use the default configuration to start ```bash sh %SHARDINGSPHEREPROXYHOME%/bin/start.sh ``` The default port is `3307`, while the default profile directory is `%SHARDINGSPHEREPROXYHOME%/conf/`. Customize port and profile directory ```bash sh %SHARDINGSPHEREPROXYHOME%/bin/start.sh ${proxyport} ${proxyconf_directory} ``` Force start ```bash sh %SHARDINGSPHEREPROXYHOME%/bin/start.sh -f ``` Use the `-f` parameter to force start the Proxy. This parameter will ignore the abnormal data source during startup and start the Proxy forcibly. After the Proxy is started, you can remove the abnormal data source by DistSQL. Use ShardingSphere-Proxy. Use MySQL or PostgreSQL or openGauss client to connect ShardingSphere-Proxy. Use the MySQL client to connect to the ShardingSphere-Proxy: ```bash mysql -h${proxyhost} -P${proxyport} -u${proxyusername} -p${proxypassword} ``` Use the PostgreSQL client to connect to the ShardingSphere-Proxy: ```bash psql -h ${proxyhost} -p ${proxyport} -U ${proxy_username} ``` Use the openGauss client to connect to the ShardingSphere-Proxy: ```bash gsql -r -h ${proxyhost} -p ${proxyport} -U ${proxyusername} -W ${proxypassword} ```
Project: KICS (Provisioning / Security & Compliance)
File: 2da46be4-4317-4650-9285-56d7103c4f93.md

title: Global Security Using Password Flow hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 2da46be4-4317-4650-9285-56d7103c4f93 Query name: Global Security Using Password Flow Platform: OpenAPI Severity: <span style="color:#ff7213">Medium</span> Category: Access Control URL: Security should not use 'password' Flow in OAuth2 authentication<br> ```json title="Positive test num. 1 - json file" hl_lines="33" { "swagger": "2.0", "info": { "title": "Simple API overview", "version": "1.0.0" }, "schemes": [ "https" ], "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "description": "200 response" } } } } }, "securityDefinitions": { "oAuth2AuthCodeNeg2": { "type": "oauth2", "description": "For more information, see https://api.my.company.com/docs/oauth", "flow": "password", "tokenUrl": "https://api.my.company.com/oauth/token" } }, "security": [ { "oAuth2AuthCodeNeg2": [ "write", "read" ] } ] } ``` ```yaml title="Positive test num. 2 - yaml file" hl_lines="22" swagger: "2.0" info: title: Simple API overview version: 1.0.0 schemes: https paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: 200 response securityDefinitions: oAuth2AuthCodeNeg2: type: oauth2 description: For more information, see https://api.my.company.com/docs/oauth flow: password tokenUrl: https://api.my.company.com/oauth/token security: oAuth2AuthCodeNeg2: write read ``` ```json title="Negative test num. 1 - json file" { "swagger": "2.0", "info": { "title": "Simple API overview", "version": "1.0.0" }, "schemes": [ "https" ], "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "description": "200 response" } } } } }, "securityDefinitions": { "oAuth2AuthCodeNeg2": { "type": "oauth2", "description": "For more information, see https://api.my.company.com/docs/oauth", "flow": "accessCode", "authorizationUrl": "https://api.my.company.com/oauth/authorize", "tokenUrl": "https://api.my.company.com/oauth/token", "scopes": { "write:api": "modify apis in your account", "read:api": "read your apis" } } }, "security": [ { "oAuth2AuthCodeNeg2": [ "write", "read" ] } ] } ``` ```yaml title="Negative test num. 2 - yaml file" swagger: "2.0" info: title: Simple API overview version: 1.0.0 schemes: https paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: 200 response securityDefinitions: oAuth2AuthCodeNeg2: type: oauth2 description: For more information, see https://api.my.company.com/docs/oauth flow: accessCode authorizationUrl: https://api.my.company.com/oauth/authorize tokenUrl: https://api.my.company.com/oauth/token scopes: write:api: modify apis in your account read:api: read your apis security: oAuth2AuthCodeNeg2: write read ```
Project: StarRocks (App Definition and Development / Database)
File: DROP_RESOURCE_GROUP.md

displayed_sidebar: "English" Drops the specified resource group. :::tip This operation requires the DROP privilege on the target resource group. You can follow the instructions in to grant this privilege. ::: ```SQL DROP RESOURCE GROUP <resourcegroupname> ``` | Parameter | Description | | - | -- | | resourcegroupname | Name of the resource group to be dropped. | Example 1: Drops the resource group `rg1`. ```SQL DROP RESOURCE GROUP rg1; ```
Project: NeuVector (Provisioning / Security & Compliance)
File: RUNC.md

containerd is built with OCI support and with support for advanced features provided by . We depend on a specific `runc` version when dealing with advanced features. You should have a specific runc build for development. The current supported runc commit is described in . Please refer to the line that starts with `github.com/opencontainers/runc`. For more information on how to clone and build runc see the runc Building . Note: before building you may need to install additional support, which will vary by platform. For example, you may need to install `libseccomp` e.g. `libseccomp-dev` for Ubuntu. From within your `opencontainers/runc` repository run: ```bash make BUILDTAGS='seccomp apparmor' && sudo make install ``` ```bash make BUILDTAGS='seccomp selinux' && sudo make install ``` After an official runc release we will start pinning containerd support to a specific version but various development and testing features may require a newer runc version than the latest release. If you encounter any runtime errors, please make sure your runc is in sync with the commit/tag provided in this document.
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.5.57.md

layout: release date: 2021-09-13 tag: v0.5.57 Fix performance dashboard appearance @utkarsh-pro (#4169) Improve performance tests graph @utkarsh-pro (#4170) Extensions/refactor/styling @sudo-NithishKarthik (#4168) fix nginx-sm manifests @DelusionalOptimist (#4163) Fix invalid edges json schema @utkarsh-pro (#4160) [Extensions] Add Play/Pause icon for meshmap @sudo-NithishKarthik (#4155) Fix prometheus and grafana discovery @utkarsh-pro (#4153) add reference to programatically submit form @killbotXD (#4152) add remote dependency @killbotXD (#4150) [Extensions] New Verify icon: doublecheckicon @leecalcote (#4164) [Application] Fix - distinguishing between url and file upload/import of Meshery applications @mgfeller (#4159) [UI] Fix Runtime Error @K-Kumar-01 (#4126) [CI] updated current workflows to put appropriate labels on PRs according to the files changed. @asubedy (#4151) Fixed all broken links @iambami (#4021) Added Traefik Mesh Lab to docs @iambami (#4141) Thank you to our contributors for making this release possible: @DelusionalOptimist, @K-Kumar-01, @asubedy, @iambami, @killbotXD, @leecalcote, @mgfeller, @sudo-NithishKarthik and @utkarsh-pro
Project: ArangoDB (App Definition and Development / Database)
File: message.md

+++ title = "Redefining `message()`" weight = 50 +++ You may remember that our custom `fileioerrordomain` inherits from `outcomee::posixcode::domain_type`, and thus does not have to implement the many pure virtual functions required by `outcomee::statuscode_domain`. What we do need to do is reimplement `domessage()` to append the file and line information to the POSIX error description string returned by `outcomee::posixcode::domain_type`. This causes the status code's `.message()` observer to return a string with the extra payload information represented in text. {{% snippet "experimentalstatuscode.cpp" "message" %}}
Project: Keycloak (Provisioning / Security & Compliance)
File: DockerComposeYamlReadme.md

-- NOTE: This installation method is intended for development use only. Please don't ever let this anywhere near prod! Client configuration has not changed since the installtion files were generated. If you change your client configuration, be sure to grab a re-generated installtion .zip from the 'Installation' tab. Keycloak server is started with the 'docker' feature enabled. I.E. -Dkeycloak.profile.feature.docker=enabled Spin up a fully functional docker registry with: docker-compose up Now you can login against the registry and perform normal operations: docker login -u $username -p $password localhost:5000 docker pull centos:7 docker tag centos:7 localhost:5000/centos:7 docker push localhost:5000/centos:7 Remember that users for the `docker login` command must be configured and available in the keycloak realm that hosts the docker client.
Project: YDB (App Definition and Development / Database)
File: bitcast.md

Performs a bitwise conversion of an integer value to the specified integer type. The conversion is always successful, but may lose precision or high-order bits. Examples ```yql SELECT BITCAST(100000ul AS Uint32), -- 100000 BITCAST(100000ul AS Int16), -- -31072 BITCAST(100000ul AS Uint16), -- 34464 BITCAST(-1 AS Int16), -- -1 BITCAST(-1 AS Uint16); -- 65535 ```
Project: Apollo (Provisioning / Automation & Configuration)
File: feature_request_en.md

name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] Describe the solution you'd like A clear and concise description of what you want to happen. Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. Additional context Add any other context or screenshots about the feature request here.
Project: KICS (Provisioning / Security & Compliance)
File: 02474449-71aa-40a1-87ae-e14497747b00.md

title: SQL DB Instance With SSL Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 02474449-71aa-40a1-87ae-e14497747b00 Query name: SQL DB Instance With SSL Disabled Platform: Terraform Severity: <span style="color:#bb2124">High</span> Category: Encryption URL: Cloud SQL Database Instance should have SSL enabled<br> ```tf title="Positive test num. 1 - tf file" hl_lines="24 9 44" resource "googlesqldatabase_instance" "positive1" { provider = google-beta name = "private-instance-${randomid.dbname_suffix.hex}" region = "us-central1" dependson = [googleservicenetworkingconnection.privatevpcconnection] settings { tier = "db-f1-micro" } } resource "googlesqldatabase_instance" "positive2" { provider = google-beta name = "private-instance-${randomid.dbname_suffix.hex}" region = "us-central1" dependson = [googleservicenetworkingconnection.privatevpcconnection] settings { tier = "db-f1-micro" ip_configuration { ipv4_enabled = false privatenetwork = googlecomputenetwork.privatenetwork.id } } } resource "googlesqldatabase_instance" "positive3" { provider = google-beta name = "private-instance-${randomid.dbname_suffix.hex}" region = "us-central1" dependson = [googleservicenetworkingconnection.privatevpcconnection] settings { tier = "db-f1-micro" ip_configuration { ipv4_enabled = false privatenetwork = googlecomputenetwork.privatenetwork.id require_ssl = false } } } ``` ```tf title="Negative test num. 1 - tf file" resource "googlesqldatabase_instance" "negative1" { provider = google-beta name = "private-instance-${randomid.dbname_suffix.hex}" region = "us-central1" dependson = [googleservicenetworkingconnection.privatevpcconnection] settings { tier = "db-f1-micro" ip_configuration { ipv4_enabled = false privatenetwork = googlecomputenetwork.privatenetwork.id require_ssl = true } } } ```
Project: Copa (Provisioning / Security & Compliance)
File: best-practices.md

title: Tagging Guidelines There are some patterns and practices you may want to consider when using Copa to patch images. Remember that these are suggestions that may not fit into your workflow, but we think that staying as close as possible to these practices offers the best experience with Copa. When patching vulnerabilities in an image, it helps to always work from the initial unmodified image. For example, say you have an image tagged `nginx:1.24.0` that contains a vulnerability. You run Copa to patch the image and produce a new image tagged `nginx:1.24.0-1`. Then if another vulnerability shows up in your `nginx:1.24.0-1` image, you should again patch from the unmodified `nginx:1.24.0` image. This will help prevent the buildup of patch layers ( is a potential future enhancement). There are a couple possible patterns that you could follow when tagging patched images. The first approach you could take is incrementing a number you append to the end of an image tag. For example, if you have an image tagged `nginx:1.24.0`, following patches would be tagged as `nginx:1.24.0-1`, `nginx:1.24.0-2`, `nginx:1.24.0-3`, and so on. With this pattern you are always explicitly aware of the patch state of the image you are using. The downside is that dependabot is currently unable bump to patched images from unmodified images or bump from one patched image to the next. Another option is a static tag that is continually reused as new patches are applied. For example, you could have an initial unmodified image that you've tagged `nginx:1.24.0-0` (in this case the `-0` at the end helps identify the base unpatched image). All following patched images are then tagged as `nginx:1.24.0`. You then know that the one tagged image always has the latest patches applied. This method makes it easy to continually consume the latest patched version of an image, but does contain some tradeoffs. First is that without pinning, image digests could change causing unpredictable behavior. Secondly, if an `ImagePullPolicy` is set to `IfNotPresent`, newly patched images would not be pulled since the tag hasn't changed.
Project: KICS (Provisioning / Security & Compliance)
File: f80e3aa7-7b34-4185-954e-440a6894dde6.md

title: IAM Role Allows All Principals To Assume hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: f80e3aa7-7b34-4185-954e-440a6894dde6 Query name: IAM Role Allows All Principals To Assume Platform: CloudFormation Severity: <span style="color:#ff7213">Medium</span> Category: Access Control URL: IAM role allows all services or principals to assume it<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="6" AWSTemplateFormatVersion: "2010-09-09" Resources: RootRole: Type: "AWS::IAM::Role" Properties: AssumeRolePolicyDocument: > { "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { "AWS": "arn:aws:iam::root" }, "Effect": "Allow", "Sid": "" } ] } ``` ```json title="Positive test num. 2 - json file" hl_lines="7" { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "RootRole": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": [ "arn:aws:iam::root" ] }, "Action": [ "sts:AssumeRole" ] } ] }, "Path": "/" } } } } ``` ```yaml title="Negative test num. 1 - yaml file" AWSTemplateFormatVersion: "2010-09-09" Resources: RootRole: Type: "AWS::IAM::Role" Properties: AssumeRolePolicyDocument: > { "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { "AWS": "arn:aws:iam::root" }, "Effect": "Deny", "Sid": "" } ] } ``` ```json title="Negative test num. 2 - json file" { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "RootRole": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Principal": { "AWS": [ "arn:aws:iam::root" ] }, "Action": [ "sts:AssumeRole" ] } ] }, "Path": "/" } } } } ```
Project: Beam (App Definition and Development / Streaming & Messaging)
File: policies.md

title: "Policies" <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> This page contains a list of major policies agreed upon by the Apache Beam community. Apache Beam makes minor releases every 6 weeks, therefore 8 releases in a 12 month period. Apache Beam has a for cutting the next release branch. After a release branch is cut, the community works quickly to finalize that release. We encourage you to update early and often; do not wait until the deprecation date of the version you are using. It is up to the Apache Beam community to decide whether an identified issue is a major issue that warrants a patch release. Some examples of major issues are high severity security issues and high risk data integrity issues. If you wish to report a security vulnerability, please contact . Apache Beam follows the typical .
Project: Lagoon (App Definition and Development / Application Definition & Image Build)
File: security-scanning.md

Harbor comes with a built-in security scanning solution provided by the Trivy service. This service analyzes a specified container image for any installed packages, and collects the version numbers of those installed packages. The Trivy service then searches the for any CVEs \(common vulnerabilities and exposures\) affecting those package versions. Trivy is also library aware, so it will scan any Composer files or other package library definition files and report any vulnerabilities found within those package versions. These vulnerabilities are then reported within Harbor for each individual container. An example of a security scan in Harbor, showing applicable vulnerabilities for a scanned container:
Project: Kui (App Definition and Development / Application Definition & Image Build)
File: kui_shell_core.DescriptionList.md

/ / DescriptionList .DescriptionList apiVersion: `"kui-shell/v1"` kind: `"DescriptionList"` spec: `Object` | Name | Type | Description | | :- | :- | : | | `as?` | `"default"` \| `"labels"` | Display as a list of key-value pairs (default), or as a list of labels | | `groups` | { `description`: `string` \| `number` \| `boolean` ; `term`: `string` ; `termHelp?`: { `description`: `string` \| `number` \| `boolean` ; `title`: `string` } }[] | - |