A short 30m overview
https://josh-ops.com/posts/lap-around-github-advanced-security/
A short 30m overview
https://josh-ops.com/posts/lap-around-github-advanced-security/
| dotnet add src/MyProject.csproj package Microsoft.Data.OData -v 5.0.1 |
| using System; | |
| using System.Security.Cryptography; | |
| class WeakEncryption | |
| { | |
| public static byte[] encryptString() | |
| { | |
| SymmetricAlgorithm serviceProvider = new DESCryptoServiceProvider(); | |
| byte[] key = { 16, 22, 240, 11, 18, 150, 192, 21 }; | |
| serviceProvider.Key = key; | |
| ICryptoTransform encryptor = serviceProvider.CreateEncryptor(); |
| apiVersion: actions.summerwind.dev/v1alpha1 | |
| kind: RunnerDeployment | |
| metadata: | |
| name: joshjohanning-org-runner | |
| spec: | |
| replicas: 1 | |
| template: | |
| spec: | |
| organization: joshjohanning-org | |
| group: k8s-group |
ca-key.key and server-key.keyopenssl genrsa -out ca.key 4096
openssl genrsa -out server.key 4096ca.conf ca config file
| $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
| $headers.Add("Accept", "application/vnd.github.v3+json") | |
| $headers.Add("Authorization", "Bearer <add your PAT here>") | |
| $headers.Add("Content-Type", "application/json") | |
| $body = "{ `n `"tag_name`": `"newest`",`n `"previous_tag_name`": `"newer`"`n}" | |
| $response = Invoke-RestMethod 'https://api.github.com/repos/services-octoshift-demo/Test-Octoshift-2/releases/generate-notes' -Method 'POST' -Headers $headers -Body $body | |
| $response | ConvertTo-Json |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| inputs: | |
| build_run_id_to_deploy: | |
| description: 'the build run id to download for deploy' | |
| required: true | |
| default: '1703586018' | |
| env: | |
| build_run_id_to_deploy: '1703586018' |
| function endsWith(x,y) { | |
| let index = x.lastIndexOf(y); | |
| return x.lastIndexOf(y) === x.length - y.length; | |
| } | |
| // comment |
| name: CI | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the main branch | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] |
| { | |
| repository(owner: "joshjohanning", name: "Wolfringo-github-packages") { | |
| packages(first: 10, packageType: NUGET, names: "Wolfringo.Commands") { | |
| edges { | |
| node { | |
| id | |
| name | |
| packageType | |
| version(version: "1.1.2") { | |
| id |