Skip to content

Instantly share code, notes, and snippets.

View AndrienkoAleksandr's full-sized avatar

Oleksandr Andriienko AndrienkoAleksandr

View GitHub Profile
@AndrienkoAleksandr
AndrienkoAleksandr / gist:74110b818d8f67786d42667baab6152b
Created February 13, 2024 13:55
@janus-idp/backstage-plugin-rbac-backend conditions
#!/bin/bash
# RBAC conditions determine which part of the resource content should be visible to the user.
curl -X POST "http://localhost:7007/api/permission/roles" -d '{ "memberReferences": [ "user:default/andrienkoaleksandr" ], "name": "role:default/test" }' -H "Content-Type: application/json" -H "Authorization: Bearer $token" -v
# Let's provide read catalog entity permission
curl -X POST "http://localhost:7007/api/permission/policies" -d '{"entityReference": "role:default/test", "permission": "catalog-entity", "policy": "read", "effect":"allow"}' -H "Content-Type: application/json" -H "Authorization: Bearer $token" -v
# Condition without criteria
{
"Golang errors": {},
"Issues": [
{
"severity": "HIGH",
"confidence": "HIGH",
"cwe": {
"id": "295",
"url": "https://cwe.mitre.org/data/definitions/295.html"
},
@AndrienkoAleksandr
AndrienkoAleksandr / gist:7c3ff756bd0e35860f8b390109b8a6d9
Created April 4, 2023 06:56
openshift-pipelines/tektoncd-results branch downstream-0.5.0-01 gosec scan result
{
"Golang errors": {
"/Users/oandriie/projects/tektoncd-results/tools/tkn-results/cmd/list.go": [
{
"line": 9,
"column": 2,
"error": "could not import github.com/tektoncd/results/tools/tkn-results/internal/flags (invalid package name: \"\")"
},
{
"line": 10,
@AndrienkoAleksandr
AndrienkoAleksandr / gist:7b4c08ccd2fb1710df132049dea46c1a
Last active April 4, 2023 06:55
pipelines-as-code 0.16.0 gosec scan result
{
"Golang errors": {},
"Issues": [
{
"severity": "HIGH",
"confidence": "LOW",
"cwe": {
"id": "798",
"url": "https://cwe.mitre.org/data/definitions/798.html"
},
@AndrienkoAleksandr
AndrienkoAleksandr / gist:5805966dfd13b65393c434de365b4beb
Created March 27, 2023 01:30
"${QUERY_CMD[@]}" | jq '.records[].data.value'
eyJraW5kIjogIlRhc2tSdW4iLCAic3BlYyI6IHsicGFyYW1zIjogW3sibmFtZSI6ICJhIiwgInZhbHVlIjogIjEwMCJ9LCB7Im5hbWUiOiAiYiIsICJ2YWx1ZSI6ICI1MDAifV0sICJ0YXNrUmVmIjogeyJraW5kIjogIlRhc2siLCAibmFtZSI6ICJtdWx0aXBseS1wYXJhbXMifSwgInRpbWVvdXQiOiAiMWgwbTBzIiwgInJlc291cmNlcyI6IHt9LCAic2VydmljZUFjY291bnROYW1lIjogInBpcGVsaW5lIn0sICJzdGF0dXMiOiB7InN0ZXBzIjogW3sibmFtZSI6ICJwcm9kdWN0IiwgImltYWdlSUQiOiAicmVnaXN0cnkuYWNjZXNzLnJlZGhhdC5jb20vdWJpOS91YmktbWluaW1hbEBzaGEyNTY6NDMyNDYxMDJjZjM3YjA4MjU3ODZjYTc4ZTlhNmUxNTNjMjZkMWE0MjQxZGRmNTMwOTJlNWIwYWMxOGZlNzdiZiIsICJjb250YWluZXIiOiAic3RlcC1wcm9kdWN0IiwgInRlcm1pbmF0ZWQiOiB7InJlYXNvbiI6ICJDb21wbGV0ZWQiLCAiZXhpdENvZGUiOiAwLCAic3RhcnRlZEF0IjogIjIwMjMtMDMtMjdUMDE6MTQ6MTVaIiwgImZpbmlzaGVkQXQiOiAiMjAyMy0wMy0yN1QwMToxNDoxNVoiLCAiY29udGFpbmVySUQiOiAiY3JpLW86Ly8zZDYzZWUyZWVmYjlhYmI1MjJjOTI3N2NjODk0OGU3Mjk1MTkwMGNlMWRhYTE2MGEyZWIwYzFhNDdjODkzZmMxIn19XSwgInBvZE5hbWUiOiAicGlwZWxpbmVydW4td2l0aC1wYXJhbXMtbXVsdGlwbHktcGFyYW1zLXBvZCIsICJ0YXNrU3BlYyI6IHsic3RlcHMiOiBbeyJuYW1lIjogInByb2R1Y3QiLCAiaW1hZ2UiOiAicmVn
apiVersion: v1
kind: Pod
metadata:
name: minio-mc
namespace: tekton-results
spec:
serviceAccount: default
containers:
- name: mc
image: >-
#!/bin/bash
set +o pipefail
ACTION=${1-""}
TESTS=$1
[[ $TESTS == all* ]] && TESTS="kiwi,lemon,orange"
TESTS=${TESTS//,/ }
OPP_INPUT_REPO=${OPP_INPUT_REPO-"operator-framework/community-operators"}
cat /var/folders/0r/5kq8sbvs327grtqxjndc2zn00000gn/T/crwctl-logs/1638960673796
cat: /var/folders/0r/5kq8sbvs327grtqxjndc2zn00000gn/T/crwctl-logs/1638960673796: No such file or directory
Oleksandrs-MacBook-Pro:bin oandriie$ cat /Users/oandriie/Library/Caches/crwctl/error.log
2021-07-13T17:00:17.314Z Warning: Consider using the more reliable 'OLM' installer when deploying a stable release of CodeReady Workspaces (--installer=olm).
2021-07-13T17:00:17.314Z at Object.warn (/Users/oandriie/Downloads/crwctl-mac/node_modules/@oclif/errors/lib/index.js:33:15)
2021-07-13T17:00:17.314Z at Deploy.warn (/Users/oandriie/Downloads/crwctl-mac/node_modules/@oclif/command/lib/command.js:55:26)
2021-07-13T17:00:17.314Z at OperatorTasks.<anonymous> (/Users/oandriie/Downloads/crwctl-mac/lib/tasks/installers/operator.js:141:25)
2021-07-13T17:00:17.314Z at Generator.next (<anonymous>)
2021-07-13T17:00:17.314Z at fulfilled (/Users/oandriie/Downloads/crwctl-mac/node_modules/tslib/tslib.js:114:62)
2021-07-13T17:0
P1:
https://github.com/eclipse/che/issues/20761
https://github.com/eclipse/che/issues/20757
https://github.com/eclipse/che/issues/20756
https://github.com/eclipse/che/issues/20752
https://github.com/eclipse/che/issues/20751
P2:
https://github.com/eclipse/che/issues/20762
https://github.com/eclipse/che/issues/20759
1
github.com/benbjohnson/clock
https://github.com/benbjohnson/clock/tree/v1.1.0
https://github.com/benbjohnson/clock/tree/307483a2173c76d3ded778bd68214865fcf05ec8
https://clearlydefined.io/definitions/git/github/benbjohnson/clock/307483a2173c76d3ded778bd68214865fcf05ec8
2
github.com/go-kit/log
https://github.com/go-kit/log/tree/v0.1.0
https://github.com/go-kit/log/tree/63376a29a92260f7b256eedf2fae39e28161114d