-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Git submodules #442
Comments
Looks like the code here: https://github.com/ossf/allstar/blob/main/pkg/config/contents.go#L26 is not equipped to handle submodules. It tries to get the contents of a file using: The GitHub docs say:
It looks like the code there would need to follow the "submodule_git_url", but I don't see how the client library exposes that. |
After a bit of investigation, it looks like the variable Digging a little deeper, it appears that there is a possibility that I suggest that you change line 200 here: if err != nil { to this: if cf == nil || err != nil { and that should fix the panic. |
EDIT: Never mind. This field was added in: google/go-github#2880 |
The above fix still gives a SIGSEV error in the │ allstar-756f9ccdb9-kvlp4 allstar panic: runtime error: invalid memory address or nil pointer dereference │
│ allstar-756f9ccdb9-kvlp4 allstar [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x134fbdb] │
│ allstar-756f9ccdb9-kvlp4 allstar │
│ allstar-756f9ccdb9-kvlp4 allstar goroutine 27 [running]: │
│ allstar-756f9ccdb9-kvlp4 allstar github.com/ossf/allstar/pkg/policies/scorecard.convertLogs({0xc00059ecc0?, 0x1, 0x2?}) I was able to solve it by adding a condition that the finding isn't null in the corresponding function: for _, l := range logs {
if (l.Msg.Finding == nil) {
continue
} The full change is available in the following commit: catawiki@9a0c4ba |
I've recently got the idea to consolidate Allstar configurations as git submodules. That way configurations can be centralized in several repositories and I can more easily switch between configurations for different collections of repositories.
However, I found that submodules make Allstar crash with the following error logs:
I've built the container from commit
1ac94c2691ef170086b91ed9f62ec84006201cd1
Any idea how this runtime error could be fixed?
The text was updated successfully, but these errors were encountered: