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

+++ title = "npm resource" draft = false gh_repo = "inspec" platform = "os" [menu] [menu.inspec] title = "npm" identifier = "inspec/resources/os/npm.md npm resource" parent = "inspec/resources/os" +++ Use the `npm` Chef InSpec audit resource to test if a global NPM package is installed. NPM is the the package manager for , such as Bower and StatsD. {{< readfile file="content/inspec/reusable/md/inspec_installation.md" >}} This resource first became available in v1.0.0 of InSpec. A `npm` resource block declares a package and (optionally) a package version: describe npm('npmpackagename') do it { should be_installed } end where `('npmpackagename')` must specify an NPM package, such as `'bower'` or `'statsd'` `be_installed` is a valid matcher for this resource You can also specify additional options: describe npm('npmpackagename', path: '/path/to/project') do it { should be_installed } end The `path` specifies a folder, that contains a `node_modules` subdirectory. It emulates running `npm` inside the specified folder. This way you can inspect local NPM installations as well as global ones. The following examples show how to use this Chef InSpec audit resource. describe npm('bower') do it { should be_installed } its('version') { should eq '1.4.1' } end describe npm('statsd') do it { shouldnot beinstalled } end {{< readfile file="content/inspec/reusable/md/inspecmatcherslink.md" >}} This resource has the following special matchers. The `be_installed` matcher tests if the named Gem package and package version (if specified) is installed: it { should be_installed } The `version` matcher tests if the named package version is on the system: its('version') { should eq '1.2.3' }
Project: StarRocks (App Definition and Development / Database)
File: Metabase.md

displayed_sidebar: "English" Metabase supports querying and visualizing both internal data and external data in StarRocks. Start Metabase and do as follows: In the upper-right corner of the Metabase homepage, click the Settings icon and choose Admin settings. Choose Databases in the top menu bar. On the Databases page, click Add database. On the page that appears, configure the database parameters and click Save. Database type: Select MySQL. Host and Port: Enter the host and port information appropriate for your use case. Database name: Enter a database name in the `<catalogname>.<databasename>` format. In StarRocks versions earlier than v3.2, you can integrate only the internal catalog of your StarRocks cluster with Metabase. From StarRocks v3.2 onwards, you can integrate both the internal catalog and external catalogs of your StarRocks cluster with Metabase. Username and Password: Enter the username and password of your StarRocks cluster user. The other parameters do not involve StarRocks. Configure them based on your business needs.
Project: KICS (Provisioning / Security & Compliance)
File: 8f98334a-99aa-4d85-b72a-1399ca010413.md

title: OSS Bucket Transfer Acceleration Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 8f98334a-99aa-4d85-b72a-1399ca010413 Query name: OSS Bucket Transfer Acceleration Disabled Platform: Terraform Severity: <span style="color:#edd57e">Low</span> Category: Availability URL: OSS Bucket should have transfer acceleration enabled<br> ```tf title="Positive test num. 1 - tf file" hl_lines="5" resource "alicloudossbucket" "bucket-accelerate" { bucket = "bucket_name" transfer_acceleration { enabled = false } } ``` ```tf title="Positive test num. 2 - tf file" hl_lines="1" resource "alicloudossbucket" "bucket-accelerate2" { bucket = "bucket_name" } ``` ```tf title="Negative test num. 1 - tf file" resource "alicloudossbucket" "bucket-accelerate3" { bucket = "bucket_name" transfer_acceleration { enabled = true } } ```
Project: ArangoDB (App Definition and Development / Database)
File: constructor.md

+++ title = "The constructor" weight = 30 +++ Code domains are 100% constexpr to construct and destruct, as are status codes. This enables the compiler to 100% instantiate both only in its mind, and to emit zero code and thus zero overhead. Unfortunately it also means that it must be possible for each domain to be instantiated an infinite number of times, and being 100% in constexpr, any instances never have a unique address in memory either. Thus we cannot compare domains for equivalence using their address in memory, as {{% api "std::error_category" %}} does. We solve this by using a very random 64 bit number taken from a hard random number source. The website https://www.random.org/cgi-bin/randbyte?nbytes=8&format=h is strongly suggested as the source for this number. (In case you are wondering about the chance of collision for a 64 bit integer, SG14 estimated that approximately 190,000 separate domains would need to exist in a single process for there to be a 0.00000001% probability of collision if the random number source is very random) {{% snippet "experimentalstatuscode.cpp" "constructor" %}} A nice side effect of this approach is that custom error domains in header-only libraries are safe, unlike custom `<system_error>` error categories. Boost.System's error categories can now opt into this same safe mechanism in order to also be safe in header only library use cases.
Project: ArangoDB (App Definition and Development / Database)
File: is_success_type.md

+++ title = "`issuccesstype<T>`" description = "An integral constant boolean variable true for `success_type<T>` types." +++ An integral constant boolean variable true for {{% api "success_type<T>" %}} types. Overridable: Not overridable. Namespace: `BOOSTOUTCOMEV2_NAMESPACE` Header: `<boost/outcome/success_failure.hpp>`
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.6.15.md

layout: release date: 2022-10-07 tag: v0.6.15 language: en [Meshery Settings] Fix Operator, Meshsync status events @Abhishek-kumar09 (#6344) Thank you to our contributors for making this release possible: @Abhishek-kumar09 and @leecalcote
Project: kaniko (App Definition and Development / Application Definition & Image Build)
File: design-proposal-template.md

Author(s): \<your name\> Reviewers: \<reviewer name\> If you are already working with someone mention their name. If not, please leave this empty, some one from the core team with assign it to themselves. Date: \<date\> Status: [Reviewed/Cancelled/Under implementation/Complete] Here is a brief explanation of the Statuses Reviewed: The proposal PR has been accepted, merged and ready for implementation. Under implementation: An accepted proposal is being implemented by actual work. Note: The design might change in this phase based on issues during implementation. Cancelled: During or before implementation the proposal was cancelled. It could be due to: other features added which made the current design proposal obsolete. No longer a priority. Complete: This feature/change is implemented. In this section, please mention and describe the new feature, redesign or refactor. Please provide a brief explanation for the following questions: Why is this required? If this is a redesign, what are the drawbacks of the current implementation? Is there any another workaround, and if so, what are its drawbacks? Mention related issues, if there are any. Here is an example snippet for an enhancement: _ Currently, Kaniko includes `build-args` when calculating layer cache key even if they are not used in the corresponding dockerfile command. This causes a 100% cache miss rate even if the layer contents are same. Change layer caching to include `build-args` in cache key computation only if they are used in command. _ Please describe your solution. Please list any: new command line flags interface changes design assumptions Please list any open questions here in the following format: \<Question\> Resolution: Please list the resolution if resolved during the design process or specify Not Yet Resolved As a team, we've noticed that larger PRs can go unreviewed for long periods of time. Small incremental changes get reviewed faster and are also easier for reviewers. _ Please describe what new test cases you are going to consider.
Project: Meshery (Provisioning / Automation & Configuration)
File: open-cluster-management.md

layout: integration title: Open Cluster Management subtitle: Collaborative and visual infrastructure as code for NGINX Service Mesh image: /assets/img/integrations/open-cluster-management/icons/color/open-cluster-management-color.svg permalink: extensibility/integrations/open-cluster-management docURL: https://docs.meshery.io/extensibility/integrations/open cluster management description: integrations-category: Orchestration & Management integrations-subcategory: Scheduling & Orchestration registrant: Artifact Hub components: featureList: [ "Drag-n-drop cloud native infrastructure designer to configure, model, and deploy your workloads.", "Invite anyone to review and make changes to your private designs.", "Ongoing synchronization of Kubernetes configuration and changes across any number of clusters." ] 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
Project: YugabyteDB (App Definition and Development / Database)
File: drop_server.diagram.md

<svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="555" height="70" viewbox="0 0 555 70"><path class="connector" d="M0 22h15m53 0h10m68 0h30m32 0h10m64 0h20m-141 0q5 0 5 5v8q0 5 5 5h116q5 0 5-5v-8q0-5 5-5m5 0h10m99 0h30m77 0h22m-109 25q0 5 5 5h5m79 0h5q5 0 5-5m-104-25q5 0 5 5v33q0 5 5 5h89q5 0 5-5v-33q0-5 5-5m5 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><rect class="literal" x="15" y="5" width="53" height="25" rx="7"/><text class="text" x="25" y="22">DROP</text><rect class="literal" x="78" y="5" width="68" height="25" rx="7"/><text class="text" x="88" y="22">SERVER</text><rect class="literal" x="176" y="5" width="32" height="25" rx="7"/><text class="text" x="186" y="22">IF</text><rect class="literal" x="218" y="5" width="64" height="25" rx="7"/><text class="text" x="228" y="22">EXISTS</text><a xlink:href="../../../syntaxresources/grammardiagrams#server-name"><rect class="rule" x="312" y="5" width="99" height="25"/><text class="text" x="322" y="22">server_name</text></a><rect class="literal" x="441" y="5" width="77" height="25" rx="7"/><text class="text" x="451" y="22">CASCADE</text><rect class="literal" x="441" y="35" width="79" height="25" rx="7"/><text class="text" x="451" y="52">RESTRICT</text><polygon points="551,29 555,29 555,15 551,15" style="fill:black;stroke-width:0"/></svg>
Project: NebulaGraph (App Definition and Development / Database)
File: pull_request_template.md

<!-- Thanks for your contribution! In order to review PR more efficiently, please add information according to the template. --> [ ] bug [ ] feature [ ] enhancement Tests: [ ] Unit test(positive and negative cases) [ ] Function test [ ] Performance test [ ] N/A Affects: [ ] Documentation affected (Please add the label if documentation needs to be modified.) [ ] Incompatibility (If it breaks the compatibility, please describe it and add the label. [ ] If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).) [ ] Performance impacted: Consumes more CPU/Memory Please confirm whether to be reflected in release notes and how to describe: ex. Fixed the bug .....
Project: Doris (App Definition and Development / Database)
File: instructions.md

<!-- 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. --> ```sql CREATE TABLE `doristestsink` ( `id` int NULL COMMENT "", `number` int NULL COMMENT "", `price` DECIMAL(12,2) NULL COMMENT "", `skuname` varchar(40) NULL COMMENT "", `skudesc` varchar(200) NULL COMMENT "" ) ENGINE=OLAP DUPLICATE KEY(`id`) COMMENT "OLAP" DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_num" = "3", "in_memory" = "false", "storage_format" = "V2" ); ``` ``` 10001,12,13.3, test1,this is atest 10002,100,15.3,test2,this is atest 10003,102,16.3,test3,this is atest 10004,120,17.3,test4,this is atest 10005,23,10.3, test5,this is atest 10006,24,112.3,test6,this is atest 10007,26,13.3, test7,this is atest 10008,29,145.3,test8,this is atest 10009,30,16.3, test9,this is atest 100010,32,18.3,test10,this is atest 100011,52,18.3,test11,this is atest 100012,62,10.3,test12,this is atest ``` ```json { "id":556393582, "number":"123344", "price":"23.5", "skuname":"test", "skudesc":"zhangfeng_test,test" } ```
Project: Distribution (Provisioning / Container Registry)
File: json.md

draft: true title: "CNCF Distribution JSON Canonicalization" description: "Explains registry JSON objects" keywords: ["registry, service, images, repository, json"] To provide consistent content hashing of JSON objects throughout CNCF Distribution APIs, the specification defines a canonical JSON format. Adopting such a canonicalization also aids in caching JSON responses. Note that protocols should not be designed to depend on identical JSON being generated across different versions or clients. The canonicalization rules are merely useful for caching and consistency. Compliant JSON should conform to the following rules: All generated JSON should comply with [RFC 7159](http://www.ietf.org/rfc/rfc7159.txt). Resulting "JSON text" shall always be encoded in UTF-8. Unless a canonical key order is defined for a particular schema, object keys shall always appear in lexically sorted order. All whitespace between tokens should be removed. No "trailing commas" are allowed in object or array definitions. The angle brackets "<" and ">" are escaped to "\u003c" and "\u003e". Ampersand "&" is escaped to "\u0026". The following is a simple example of a canonicalized JSON string: ```json {"asdf":1,"qwer":[],"zxcv":[{},true,1000000000,"tyui"]} ``` The OLPC project specifies [Canonical JSON](http://wiki.laptop.org/go/Canonical_JSON). While this is used in , which may be used with other distribution-related protocols, this alternative format has been proposed in case the original source changes. Specifications complying with either this specification or an alternative should explicitly call out the canonicalization format. Except for key ordering, this specification is mostly compatible. In Go, the library will emit canonical JSON by default. Simply using `json.Marshal` will suffice in most cases: ```go incoming := map[string]interface{}{ "asdf": 1, "qwer": []interface{}{}, "zxcv": []interface{}{ map[string]interface{}{}, true, int(1e9), "tyui", }, } canonical, err := json.Marshal(incoming) if err != nil { // ... handle error } ``` To apply canonical JSON format spacing to an existing serialized JSON buffer, one can use with the following arguments: ```go incoming := getBytes() var canonical bytes.Buffer if err := json.Indent(&canonical, incoming, "", ""); err != nil { // ... handle error } ```
Project: SeaTunnel (App Definition and Development / Streaming & Messaging)
File: cdc-compatible-debezium-json.md

SeaTunnel supports to interpret cdc record as Debezium-JSON messages publish to mq(kafka) system. This is useful in many cases to leverage this feature, such as compatible with the debezium ecosystem. ```bash env { parallelism = 1 job.mode = "STREAMING" checkpoint.interval = 15000 } source { MySQL-CDC { resulttablename = "table1" base-url="jdbc:mysql://localhost:3306/test" "startup.mode"=INITIAL table-names=[ "database1.t1", "database1.t2", "database2.t1" ] format = compatibledebeziumjson debezium = { key.converter.schemas.enable = false value.converter.schemas.enable = false include.schema.changes = true database.server.name = "mysqlcdc1" } } } sink { Kafka { sourcetablename = "table1" bootstrap.servers = "localhost:9092" format = compatibledebeziumjson } } ```
Project: Operator Framework (App Definition and Development / Application Definition & Image Build)
File: v1.2.0.md

title: v1.2.0 weight: 998998000 In the `Makefile` file, replace `bundle: manifests` with `bundle: manifests kustomize` to call the kustomize target when the `bundle` target is used. See for more details. In the `go.mod` file replace `sigs.k8s.io/controller-runtime v0.6.2` with `sigs.k8s.io/controller-runtime v0.6.3` and then run `go mod tidy`. See for more details. If your project is multi-group, then replace `CRDDirectoryPaths: . See for more details.
Project: KICS (Provisioning / Security & Compliance)
File: 4216ebac-d74c-4423-b437-35025cb88af5.md

title: Network Interfaces IP Forwarding Enabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 4216ebac-d74c-4423-b437-35025cb88af5 Query name: Network Interfaces IP Forwarding Enabled Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: Network Interfaces IP Forwarding should be disabled<br> ```tf title="Positive test num. 1 - tf file" hl_lines="12" resource "azurermnetworkinterface" "positive" { name = "example-nic" location = azurermresourcegroup.example.location resourcegroupname = azurermresourcegroup.example.name ip_configuration { name = "internal" subnetid = azurermsubnet.example.id privateipaddress_allocation = "Dynamic" } enableipforwarding = true } ``` ```tf title="Negative test num. 1 - tf file" resource "azurermnetworkinterface" "negative1" { name = "example-nic" location = azurermresourcegroup.example.location resourcegroupname = azurermresourcegroup.example.name ip_configuration { name = "internal" subnetid = azurermsubnet.example.id privateipaddress_allocation = "Dynamic" } enableipforwarding = false } ``` ```tf title="Negative test num. 2 - tf file" resource "azurermnetworkinterface" "negative2" { name = "example-nic" location = azurermresourcegroup.example.location resourcegroupname = azurermresourcegroup.example.name ip_configuration { name = "internal" subnetid = azurermsubnet.example.id privateipaddress_allocation = "Dynamic" } } ```
Project: Backstage (App Definition and Development / Application Definition & Image Build)
File: ExampleComponent.md

ExampleComponent.tsx reference ```tsx import React from 'react'; import { Typography, Grid } from '@material-ui/core'; import { identityApiRef, useApi } from '@backstage/core-plugin-api'; import { InfoCard, Header, Page, Content, ContentHeader, HeaderLabel, SupportButton, } from '@backstage/core-components'; import { ExampleFetchComponent } from '../ExampleFetchComponent'; export const ExampleComponent = () => { const identityApi = useApi(identityApiRef); const userId = identityApi.getUserId(); const profile = identityApi.getProfile(); return ( <Page themeId="tool"> <Header title="Welcome to github-playground!" subtitle="Optional subtitle" > <HeaderLabel label="Owner" value="Team X" /> <HeaderLabel label="Lifecycle" value="Alpha" /> </Header> <Content> <ContentHeader title="Plugin title"> <SupportButton>A description of your plugin goes here.</SupportButton> </ContentHeader> <Grid container spacing={3} direction="column"> <Grid item> <InfoCard title={userId}> <Typography variant="body1"> {`${profile.displayName} | ${profile.email}`} </Typography> </InfoCard> </Grid> <Grid item> <ExampleFetchComponent /> </Grid> </Grid> </Content> </Page> ); }; ```
Project: KICS (Provisioning / Security & Compliance)
File: b947809d-dd2f-4de9-b724-04d101c515aa.md

title: Redis Not Updated Regularly hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: b947809d-dd2f-4de9-b724-04d101c515aa Query name: Redis Not Updated Regularly Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Insecure Configurations URL: Redis Cache is not configured to be updated regularly with security and operational updates<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "azurermrediscache" "positive1" { name = "timeout-redis" location = "West Europe" resourcegroupname = azurermresourcegroup.example_rg.name subnetid = azurermsubnet.exampleredissnet.id family = "P" capacity = 1 sku_name = "Premium" shard_count = 1 enablenonssl_port = false minimumtlsversion = "1.2" redis_configuration { enable_authentication = true maxmemory_policy = "volatile-lru" } } ``` ```tf title="Negative test num. 1 - tf file" resource "azurermrediscache" "negative1" { name = "timeout-redis" location = "West Europe" resourcegroupname = azurermresourcegroup.example_rg.name subnetid = azurermsubnet.exampleredissnet.id family = "P" capacity = 1 sku_name = "Premium" shard_count = 1 enablenonssl_port = false minimumtlsversion = "1.2" redis_configuration { enable_authentication = true maxmemory_policy = "volatile-lru" } patch_schedule { dayofweek = "Thursday" starthourutc = 7 } } ```
Project: CockroachDB (App Definition and Development / Database)
File: CONTRIBUTING.md

Suitable for | Project | Resources -|| For new developers | | For Go developers | Work on CockroachDB code: | For Kubernetes enthusiasts | Work on the Kubernetes Operator: | For tech writers and docs enthusiasts | Help improve CockroachDB docs: | Our contributor guidelines are available on . At this location, we share our team guidelines and knowledge base regarding: repository layout how to build from source how to organize your code change commenting guidelines commit message guidelines code style guidelines how to write and run tests how to write release notes how to submit a change for review how to use continuous integration (CI) how to troubleshoot certain issues as well as many other practical topics. Join our (there's a dedicated #contributors channel!) to ask questions, discuss your ideas, or connect with other contributors. Please follow the guidelines outlined in our to help us make the CockroachDB community a welcoming and helpful place for everyone. As a contributor, you can help us keep our community open and inclusive. Please read and follow our [Code of Conduct](https://github.com/cockroachdb/code-of-conduct).
Project: ClickHouse (App Definition and Development / Database)
File: v21.7.8.58-stable.md

sidebar_position: 1 sidebar_label: 2022 Backported in : Fix errors like `Expected ColumnLowCardinality, gotUInt8` or `Bad cast from type DB::ColumnVector<char8_t> to DB::ColumnLowCardinality` for some queries with `LowCardinality` in `PREWHERE`. Fixes . (). Backported in : Fix incorrect result for query with row-level security, prewhere and LowCardinality filter. Fixes . (). Backported in : fix metric BackgroundMessageBrokerSchedulePoolTask, maybe mistyped. (). Backported in : Fix crash during projection materialization when some parts contain missing columns. This fixes . (). Backported in : - Fix bug with aliased column in `Distributed` table. (). Backported in : Fix postgresql table function resulting in non-closing connections. Closes . (). Backported in : Fix bad type cast when functions like `arrayHas` are applied to arrays of LowCardinality of Nullable of different non-numeric types like `DateTime` and `DateTime64`. In previous versions bad cast occurs. In new version it will lead to exception. This closes . (). Backported in : Remove duplicated source files in CMakeLists.txt in arrow-cmake. (). Fix killing unstopped containers in integration tests. (). Revert . User-level settings will affect queries from view. ().