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

+++ title = "`explicit basicresult(concepts::valueor_error<T, E> &&)`" description = "Explicit converting constructor from `concepts::valueorerror<T, E>` concept matching types. Available if `convert::valueorerror<>` permits it. Constexpr, triviality and noexcept propagating." categories = ["constructors", "explicit-constructors", "converting-constructors"] weight = 300 +++ Explicit converting constructor from {{% api "concepts::valueorerror<T, E>" %}} concept matching types. Delegates to the `basic_result` move constructor. Requires: `convert::`{{% api "valueorerror<T, U>" %}} has an available call operator, and if the input is a `basicresult` or `basicoutcome`, then `convert::valueorerror<>` has enabled those inputs for that `convert::valueorerror<>` specialisation. Complexity: Same as for the copy or move constructor from the input's `.value()` or `.error()` respectively. Constexpr, triviality and noexcept of underlying operations is propagated. Guarantees: If an exception is thrown during the operation, the object is left in a partially completed state, as per the normal rules for the same operation on a `struct`.
Project: YugabyteDB (App Definition and Development / Database)
File: declare_masking_rules.md

Put on your Masks ! =============================================================================== The main idea of this extension is to offer anonymization by design. The data masking rules should be written by the people who develop the application because they have the best knowledge of how the data model works. Therefore masking rules must be implemented directly inside the database schema. This allows to mask the data directly inside the PostgreSQL instance without using an external tool and thus limiting the exposure and the risks of data leak. The data masking rules are declared simply by using [security labels]: <!-- demo/declaremaskingrules.sql --> ```sql CREATE TABLE player( id SERIAL, name TEXT, points INT); INSERT INTO player VALUES ( 1, 'Kareem Abdul-Jabbar', 38387), ( 5, 'Michael Jordan', 32292 ); SECURITY LABEL FOR anon ON COLUMN player.name IS 'MASKED WITH FUNCTION anon.fakelastname()'; SECURITY LABEL FOR anon ON COLUMN player.id IS 'MASKED WITH VALUE NULL'; ``` Escaping String literals As you may have noticed the masking rule definitions are placed between single quotes. Therefore if you need to use a string inside a masking rule, you need to use [C-Style escapes] like this: ```sql SECURITY LABEL FOR anon ON COLUMN player.name IS E'MASKED WITH VALUE \'CONFIDENTIAL\''; ``` Or use [dollar quoting] which is easier to read: ```sql SECURITY LABEL FOR anon ON COLUMN player.name IS 'MASKED WITH VALUE $$CONFIDENTIAL$$'; ``` Listing masking rules To display all the masking rules declared in the current database, check out the `anon.pgmaskingrules`: ```sql SELECT * FROM anon.pgmaskingrules; ``` Debugging masking rules When an error occurs to due a wrong masking rule, you can get more detailed information about the problem by setting `clientminmessages` to `DEBUG` and you will get useful details ``` sql postgres=# SET clientminmessages=DEBUG; SET postgres=# SELECT anon.anonymize_database(); DEBUG: Anonymize table public.bar with firstname = anon.fakefirstname() DEBUG: Anonymize table public.foo with id = NULL ERROR: Cannot mask a "NOT NULL" column with a NULL value HINT: If privacybydesign is enabled, add a default value to the column CONTEXT: PL/pgSQL function anon.anonymize_table(regclass) line 47 at RAISE SQL function "anonymize_database" statement 1 ``` Removing a masking rule You can simply erase a masking rule like this: ```sql SECURITY LABEL FOR anon ON COLUMN player.name IS NULL; ``` To remove all rules at once, you can use: ```sql SELECT anon.removemasksforallcolumns(); ``` Limitations The maximum length of a masking rule is 1024 characters. If you need more, you should probably [write a dedicated masking function]. The masking rules are NOT INHERITED* ! If you have split a table into multiple partitions, you need to declare the masking rules for each partition. Declaring Rules with COMMENTs is deprecated. Previous version of the extension allowed users to declare masking rules using the `COMMENT` syntax. This is not suppported any more. `SECURITY LABELS` are now the only way to declare rules.
Project: Meshery (Provisioning / Automation & Configuration)
File: grafana-agent-operator.md

layout: integration title: Grafana Agent Operator subtitle: Operational dashboards for your data with Grafana and Meshery image: /assets/img/integrations/grafana-agent-operator/icons/color/grafana-agent-operator-color.svg permalink: extensibility/integrations/grafana-agent-operator docURL: https://docs.meshery.io/extensibility/integrations/grafana-agent-operator description: integrations-category: Observability and Analysis integrations-subcategory: Monitoring registrant: Artifact Hub components: featureList: [ "Meshery discovers your Grafana servers", "Easily import existing Grafana dashboards and panels into Meshery", "Integrate your boards and panels and new insights and metrics" ] 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: CockroachDB (App Definition and Development / Database)
File: README_crdb.md

These files are a fork of `pkg/json` package. `scanner.go`, `decoder.go`, and `reader.go` were copied from pkg/json Additional utility methods added (e.g. to reset decoder) Ability to query reader position, etc. Package name renamed from `json` to `tokenizer` Removal of unused functions Probably, the largest change from the original is in the `scanner.go`. Changes were made to support un-escaping escaped characters, including unicode characters.
Project: MongoDB (App Definition and Development / Database)
File: string_manipulation.md

For string manipulation, use the util/mongoutils/str.h library. `util/mongoutils/str.h` provides string helper functions for each manipulation. `str::stream()` is quite useful for assembling strings inline: ``` uassert(12345, str::stream() << "bad ns:" << ns, isOk); ``` ``` / A StringData object wraps a 'const std::string&' or a 'const char*' without copying its contents. The most common usage is as a function argument that takes any of the two forms of strings above. Fundamentally, this class tries to work around the fact that string literals in C++ are char[N]'s. * Important: the object StringData wraps must remain alive while the StringData is. */ class StringData { ``` See also .
Project: ClickHouse (App Definition and Development / Database)
File: performance-test.md

slug: /en/operations/performance-test sidebar_position: 54 sidebar_label: Testing Hardware title: "How to Test Your Hardware with ClickHouse" import SelfManaged from '@site/docs/en/snippets/selfmanagedonlynoroadmap.md'; <SelfManaged /> You can run a basic ClickHouse performance test on any server without installation of ClickHouse packages. You can run the benchmark with a single script. Download the script. ``` wget https://raw.githubusercontent.com/ClickHouse/ClickBench/main/hardware/hardware.sh ``` Run the script. ``` chmod a+x ./hardware.sh ./hardware.sh ``` Copy the output and send it to feedback@clickhouse.com All the results are published here: https://clickhouse.com/benchmark/hardware/
Project: KubeClarity (Provisioning / Security & Compliance)
File: bug_report.md

name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: '' <!-- Please use this template while reporting a bug and provide as much info as possible. --> (e.g. `kubectl logs -n kubeclarity --selector=app=kubeclarity`) Kubernetes version (use `kubectl version --short`): Helm version (use `helm version`): KubeClarity version (use `kubectl -n kubeclarity exec deploy/kubeclarity -- ./backend version`) KubeClarity Helm Chart version (use `helm -n kubeclarity list`) Cloud provider or hardware configuration: Others:
Project: Athenz (Provisioning / Key Management)
File: events_monitoring.md

Athenz can be monitored by capturing events using an Event monitoring service. The following events can be sent by Athenz API HTTP Requests - Name of API method, status and duration Certificate Requests Email Reminders and Notifications Enable ZMS Event Monitoring in Prometheus for ZMS server by performing the following steps: Build the `athenzmetricsprometheus` Java project located in `contributions/metric/prometheus` Place it in the ZMS Server classpath Edit the zms.properties file: ``` athenz.zms.metricfactoryclass=com.yahoo.athenz.common.metrics.impl.prometheus.PrometheusMetricFactory ``` Enable ZTS Event Monitoring in Prometheus for ZTS server by performing the following steps: Build the `athenzmetricsprometheus` Java project located in `contributions/metric/prometheus` Place it in the ZTS Server classpath Edit the zts.properties file: ``` athenz.zts.metricfactoryclass=com.yahoo.athenz.common.metrics.impl.prometheus.PrometheusMetricFactory ``` You may also choose to enable Email Notifications and record the notifications sent in an Event Monitoring Service. The Event Monitoring Service may be the same one used to record other Athenz Events or can be a dedicated service that captures Notification Events only. To enable Notification Events for Prometheus, perform the following steps: Enable Email Notifications by following the steps in Edit the `athenz.zms.notificationservicefactory_class` property to also include the `MetricNotificationServiceFactory` class. For example, if the NotificationServiceFactory used is `com.yahoo.athenz.common.server.notification.impl.NotificationServiceFactoryImpl` (the default AWS Email Notification Service Factory), then the property should be: ``` athenz.zms.notificationservicefactory_class=com.yahoo.athenz.common.server.notification.impl.NotificationServiceFactoryImpl, com.yahoo.athenz.common.server.notification.impl.MetricNotificationServiceFactory ``` Build the `athenzmetricsprometheus` Java project located in `contributions/metric/prometheus` Place it in the ZMS / ZTS Server classpath Edit the zts.properties file for ZTS and zms.properties file to ZMS: ``` athenz.notification.metricfactoryclass=com.yahoo.athenz.common.metrics.impl.prometheus.PrometheusMetricFactory ``` To use Monitoring Services other than Prometheus, create a Jar file on the Athenz classpath with implementations for the following Interface: ``` com.yahoo.athenz.common.metrics.MetricFactory - A factory that creates a Notification Service based on a Notifications Provider. ```
Project: KUDO (App Definition and Development / Application Definition & Image Build)
File: STYLEGUIDE.md

In an effort to encourage clear, clean, uniform and readable code it is useful to have a style guide to establish standards and expectations for code and artifact files. KUDO is a project written primarily in , both of which have some differences in their style and expectation of code and APIs. In addition the founders of KUDO have some of their own preferences. This guide captures the preferred standards of this project. When writing Go code, We favor Go idioms over Kubernetes style. Worth reading: Here are some common cases / deviations: All code should pass the linter. For cases of intentional lint deviation, it is expected that: The linter is configured with the new rule. The linter is configured to ignore the case. The case is documented in code. `make lint` The general Go approach is to have a line of separation between Go libraries and external packages. We prefer to have an additional line of separation grouping kudo packages separately at the end. Example: ``` import ( // standard library packages "context" "fmt" // third-party library packages "github.com/onsi/gomega" "github.com/sirupsen/logrus" appsv1 "k8s.io/api/apps/v1" "k8s.io/client-go/tools/record" "sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/pkg/target" ktypes "sigs.k8s.io/kustomize/pkg/types" // kudo packages "github.com/kudobuilder/kudo/pkg/util/kudo" "github.com/kudobuilder/kudo/pkg/version" ) ``` Executing `make lint` uses `goimports` which is configured to ensure this structure and will error in most situations that differ. Unfortunately not all pattern mismatches are captured. `make imports` is also a useful tool in order to help create this structure. If all imports are in 1 import block (no lines of separation), `make imports` will modify the file in the appropriate order and structure. If you use Goland or Intellij IDEA, setting the following under "Editor > Code Style > Go" in the "Imports" tab will match the above requirements: ``` [x] Add parentheses for a single import Sorting type [gofmt] [x] Group stdlib imports [x] Move all stdlib imports in a single group [x] Group current project imports [x] Move all import in a single declaration ``` In general, naming should follow over .
Project: KICS (Provisioning / Security & Compliance)
File: 54c417bf-c762-48b9-9d31-b3d87047e3f0.md

title: SQL Analysis Services Port 2383 (TCP) Is Publicly Accessible hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 54c417bf-c762-48b9-9d31-b3d87047e3f0 Query name: SQL Analysis Services Port 2383 (TCP) Is Publicly Accessible Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: Check if port 2383 on TCP is publicly accessible by checking the CIDR block range that can access it.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="19 6" resource "awssecuritygroup" "positive1" { name = "allowtls1" description = "Allow TLS inbound traffic" vpcid = awsvpc.main.id ingress { description = "TLS from VPC" from_port = 2300 to_port = 2400 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } } resource "awssecuritygroup" "positive2" { name = "allowtls2" description = "Allow TLS inbound traffic" vpcid = awsvpc.main.id ingress { description = "TLS from VPC" from_port = 2380 to_port = 2390 protocol = "tcp" cidr_blocks = ["0.1.0.0/0"] } ingress { description = "TLS from VPC" from_port = 2350 to_port = 2384 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } } ``` ```tf title="Negative test num. 1 - tf file" resource "awssecuritygroup" "negative1" { name = "allow_tls" description = "Allow TLS inbound traffic" vpcid = awsvpc.main.id ingress { description = "TLS from VPC" from_port = 2383 to_port = 2383 protocol = "tcp" cidr_blocks = ["0.1.0.0/0"] } } ```
Project: OceanBase (App Definition and Development / Database)
File: CODE_OF_CONDUCT.md

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity, and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. Examples of behavior that contributes to creating a positive environment include: Using welcoming and inclusive language Being respectful of differing viewpoints and experiences Gracefully accepting constructive criticism Focusing on what is best for the community Showing empathy towards other community members Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or advances Trolling, insulting/derogatory comments, and personal or political attacks Public or private harassment Publishing others' private information, such as a physical or electronic address, without explicit permission Other conduct which could reasonably be considered inappropriate in a professional setting Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@oceanbase.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality about the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. This Code of Conduct is adapted from the , version 1.4. For answers to common questions about this code of conduct, see .
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_project_services.md

+++ title = "googleprojectservices resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googleprojectservices" identifier = "inspec/resources/gcp/googleprojectservices.md googleprojectservices resource" parent = "inspec/resources/gcp" +++ A `googleprojectservices` is used to test a Google Service resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource ```ruby describe.one do googleprojectservices(project: 'chef-gcp-inspec').names.each do |name| describe name do it { should match 'maps-android-backend.googleapis.com' } end end end ``` Properties that can be accessed from the `googleprojectservices` resource: See the resource for more information. `names` : an array of `googleprojectservice` name `parents` : an array of `googleprojectservice` parent `states` : an array of `googleprojectservice` state `disabledependentservices` : an array of `googleprojectservice` disabledependentservices `configs` : an array of `googleprojectservice` config This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. Ensure the is enabled for the current project.
Project: Kubescape (Provisioning / Security & Compliance)
File: installation.md

Note: We do not recommend this method if you want to get auto-updating from package managers or have more platforms supported. ```bash curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash ``` To install a previous version, you can specify it in the command line. ```bash curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 ``` You must have PowerShell v5.0 or higher: ```powershell iwr -useb https://raw.githubusercontent.com/kubescape/kubescape/master/install.ps1 | iex ``` If you get an error, you may need to change the execution policy: ```powershell Set-ExecutionPolicy RemoteSigned -scope CurrentUser ``` Note: openSUSE community-supported. ```bash sudo zypper refresh sudo zypper install kubescape ``` ```bash yay -S kubescape ``` If you would like to save some time and do not want to compile, install `kubescape-bin` instead: Note: kubescape-bin is AUR community-supported. ```bash yay -S kubescape-bin ``` ```bash sudo add-apt-repository ppa:kubescape/kubescape sudo apt update sudo apt install kubescape ``` Please follow the . Note: The kubescape delivered by comes with git disabled. ```bash brew install kubescape ``` If you want to have the git enabled one, you can install via the : ```bash brew tap kubescape/tap brew install kubescape-cli ``` Note: Chocolatey . ```powershell choco install kubescape ``` Note: Scoop . ```powershell scoop install kubescape ``` ```bash kubectl krew update kubectl krew install kubescape kubectl kubescape ``` ](https://snapcraft.io/kubescape) Note: This method is community-supported. If you are having trouble, please reach out to . You can use `nix` on Linux or macOS. Try it out in an ephemeral shell: `nix-shell -p kubescape`. NixOS: ``` environment.systemPackages = with pkgs; [ kubescape ]; ``` home-manager: ``` home.packages = with pkgs; [ kubescape ]; ``` Or, to your profile (not preferred): `nix-env --install -A nixpkgs.kubescape`.
Project: Podman (App Definition and Development / Application Definition & Image Build)
File: cache-from.md

Repository to utilize as a potential cache source. When specified, Buildah tries to look for cache images in the specified repository and attempts to pull cache images instead of actually executing the build steps locally. Buildah only attempts to pull previously cached images if they are considered as valid cache hits. Use the `--cache-to` option to populate a remote repository with cache content. Example ```bash buildah build -t test --layers --cache-to registry/myrepo/cache --cache-from registry/myrepo/cache . ``` Note: `--cache-from` option is ignored unless `--layers` is specified.