Comments (3)
Going to do some digging into this today 👍
from ghas-enablement.
I can't seem to replicate this 😢
I just ran something like this:
name: Workflow
on:
workflow_dispatch:
env:
ENABLE_ON: "codescanning,secretscanning,pushprotection,dependabot,dependabotupdates,actions"
DEBUG: "ghas:*"
CREATE_ISSUE: "true"
GHES: "false"
GITHUB_ORG: ${{ secrets.MY_ORG }}
GITHUB_API_TOKEN: ${{ secrets.MY_TOKEN }}
jobs:
enable-security-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: NickLiffen/ghas-enablement
- name: Get dependencies and configure
run: |
yarn
git config --global user.name "ghas-enablement"
git config --global user.email "[email protected]"
- name: Enable security on organization (python)
run: |
npm run getRepos
npm run start
env:
LANGUAGE_TO_CHECK: "python"
TEMP_DIR: ${{ github.workspace }}
Could you create two secrets, one with the org name and one with the PAT and try giving this a go 🤔 With the scopes documented in the README
it should work 🤔
from ghas-enablement.
One of our repositories is experiencing the same error, while the majority of them are functioning properly.
2023-08-14T22:05:40.298Z ghas:inform Found default branch SHA on the following repository: xxx-edge-api. The default branch is: db2edea247a517bfd1192c98b3533f8a9a1f5f26
2023-08-14T22:05:40.914Z ghas:inform Branch (ref) created on the following repository xxx-edge-api?. The branch reference is: refs/heads/feature/ghas-hCGOm
{
type: 'token',
tokenType: 'installation',
token: '***',
installationId: xxxx,
permissions: {
organization_administration: 'write',
administration: 'write',
contents: 'write',
issues: 'write',
metadata: 'read',
pull_requests: 'write',
security_events: 'write',
workflows: 'write'
},
createdAt: '2023-08-14T22:05:41.049Z',
expiresAt: '2023-08-14T23:05:40Z',
repositorySelection: 'all'
}
2023-08-14T22:05:41.053Z ghas:inform [
{
command: 'rm',
args: [ '-rf', './tempGitLocations' ],
cwd: '//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/'
},
{
command: 'mkdir',
args: [ 'tempGitLocations' ],
cwd: '//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement'
},
{
command: 'git',
args: [
'clone',
'***github.com/TMN/xxx-edge-api.git'
],
cwd: '//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations'
},
{
command: 'git',
args: [ 'checkout', '-b', 'feature/ghas-hCGOm' ],
cwd: '//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api'
},
{
command: 'mkdir',
args: [ '-p', [Array] ],
cwd: '//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api'
},
{
command: 'cp',
args: [
'./bin/workflows/codeql-analysis-javascript.yml',
'//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api/.github/workflows/codeql-analysis.yml'
],
cwd: '/home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement'
},
{
command: 'git',
args: [ 'add', '.github/workflows/codeql-analysis.yml' ],
cwd: '//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api'
},
{
command: 'git',
args: [ 'commit', '-m', '"Commit CodeQL File"' ],
cwd: '//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api'
},
{
command: 'git',
args: [ 'push', '--set-upstream', 'origin', 'feature/ghas-hCGOm' ],
cwd: '//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api'
},
{
command: 'rm',
args: [ '-rf', './tempGitLocations/' ],
cwd: '//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/'
}
]
2023-08-14T22:05:41.053Z ghas:inform Executing: rm -rf,./tempGitLocations in //home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/
2023-08-14T22:05:41.061Z ghas:inform
2023-08-14T22:05:42.061Z ghas:inform Executing: mkdir tempGitLocations in //home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement
2023-08-14T22:05:42.066Z ghas:inform
2023-08-14T22:05:43.067Z ghas:inform Executing: git ***github.com/TMN/xxx-edge-api.git in //home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations
2023-08-14T22:05:44.781Z ghas:error Cloning into 'xxx-edge-api'...
2023-08-14T22:05:44.781Z ghas:inform
2023-08-14T22:05:45.782Z ghas:inform Executing: git checkout,-b,feature/ghas-hCGOm in //home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api
2023-08-14T22:05:45.788Z ghas:error Switched to a new branch 'feature/ghas-hCGOm'
2023-08-14T22:05:45.788Z ghas:inform
2023-08-14T22:05:46.789Z ghas:inform Executing: mkdir -p,.github/workflows in //home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api
2023-08-14T22:05:46.794Z ghas:inform
2023-08-14T22:05:47.795Z ghas:inform Executing: cp ./bin/workflows/codeql-analysis-javascript.yml,//home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api/.github/workflows/codeql-analysis.yml in /home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement
2023-08-14T22:05:47.802Z ghas:inform
2023-08-14T22:05:48.803Z ghas:inform Executing: git add,.github/workflows/codeql-analysis.yml in //home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api
2023-08-14T22:05:48.810Z ghas:inform
2023-08-14T22:05:49.812Z ghas:inform Executing: git commit,-m,"Commit CodeQL File" in //home/runner/work/tdpx-ghas-enablement/tdpx-ghas-enablement/tempGitLocations/xxx-edge-api
2023-08-14T22:05:49.819Z ghas:inform Whitelist returns: false
2023-08-14T22:05:49.819Z ghas:error Error: Command failed: git commit -m "Commit CodeQL File"
at ChildProcess.exithandler (node:child_process:419:12)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:514:28)
at Pipe.<anonymous> (node:net:323:12)
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
Error: Command failed: git commit -m "Commit CodeQL File"
at ChildProcess.exithandler (node:child_process:419:12)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:514:28)
at Pipe.<anonymous> (node:net:323:12) {
code: 1,
killed: false,
signal: null,
cmd: 'git commit -m "Commit CodeQL File"',
stdout: 'On branch feature/ghas-hCGOm\nnothing to commit, working tree clean\n',
stderr: ''
}
Node.js v18.17.0
Error: Process completed with exit code 1.
from ghas-enablement.
Related Issues (20)
- Enable security on organization (csharp) does not work HOT 4
- Code breaker
- 'ghas:error TypeError' on 'yarn run getRepos' HOT 3
- 'yarn run getRepos' fails with a type error HOT 1
- Enable Dependabot version updates HOT 1
- Option to enable Secret Scanning Push Protection HOT 5
- build error HOT 4
- yarn run build fails on initial clone HOT 2
- Support public repositories with `secretscanning`, or `pushprotection` HOT 4
- GitHub App token times out after 1 hour HOT 3
- User Feedback
- deleted HOT 3
- Unable to apply CodeQL to any branch that is not the default branch HOT 3
- Just a minor typo HOT 1
- HTTP error when using in github Actions mode HOT 6
- Missing codeql-analysis.yaml file in root of repo HOT 1
- How to apply the CodeQL to a repo without a Pull Request? HOT 2
- How do I call `getRepos` and query for just repositories with a prefix HOT 2
- Error: git add .github/workflows/codeql-analysis.yml HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghas-enablement.