Skip to content
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

Artifact Evidence error #2852

Open
krishnamanchikalapudi opened this issue Jan 30, 2025 · 0 comments
Open

Artifact Evidence error #2852

krishnamanchikalapudi opened this issue Jan 30, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@krishnamanchikalapudi
Copy link

Describe the bug

I am using the JFCLI evidence doc to generate artifact evidence for a JAR file recently uploaded to Artifactory using the jf mvn command. However, when following the Artifact Evidence syntax & sample, I encounter the following error panic: runtime error: invalid memory address or nil pointer dereference Could someone provide guidance on resolving this issue?

Current behavior

Image

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x90 pc=0x1029ff21c]

goroutine 1 [running]:
github.com/jfrog/jfrog-cli-artifactory/evidence.createAndSignEnvelope({0x14000460200, 0x1ff, 0x200}, {0x16dbf2d27, 0x29}, {0x16dbf2d5d, 0x1c})
github.com/jfrog/[email protected]/evidence/create_base.go:150 +0x8c
github.com/jfrog/jfrog-cli-artifactory/evidence.(*createEvidenceBase).createEnvelope(0x14000428180, {0x16dbf2ca1?, 0x102252220?}, {0x0?, 0x140000021c0?})
github.com/jfrog/[email protected]/evidence/create_base.go:36 +0x44
github.com/jfrog/jfrog-cli-artifactory/evidence.(*createEvidenceCustom).Run(0x14000428180)
github.com/jfrog/[email protected]/evidence/create_custom.go:39 +0x30
github.com/jfrog/jfrog-cli-core/v2/common/commands.Exec({0x14aeeae00, 0x14000428180})
github.com/jfrog/jfrog-cli-core/[email protected]/common/commands/command.go:36 +0x9c
github.com/jfrog/jfrog-cli-artifactory/evidence/cli.(*evidenceCustomCommand).CreateEvidence(0x14000446110, 0x13?, 0x140002bf080)
github.com/jfrog/[email protected]/evidence/cli/command_custom.go:30 +0x2e0
github.com/jfrog/jfrog-cli-artifactory/evidence/cli.createEvidence(0x14000405200)
github.com/jfrog/[email protected]/evidence/cli/command_cli.go:60 +0x2d4
github.com/jfrog/jfrog-cli-core/v2/plugins/components.convertCommand.getActionFunc.func2(0x140002dcaf8?)
github.com/jfrog/jfrog-cli-core/[email protected]/plugins/components/conversionlayer.go:376 +0x58
github.com/urfave/cli.HandleAction({0x103286e40?, 0x140003f8190?}, 0xf?)
github.com/urfave/[email protected]/app.go:522 +0xd8
github.com/urfave/cli.Command.Run({{0x102e7d0b8, 0xf}, {0x0, 0x0}, {0x140003f80c0, 0x1, 0x1}, {0x102f1c1a3, 0x74}, {0x0, ...}, ...}, ...)
github.com/urfave/[email protected]/command.go:175 +0x530
github.com/urfave/cli.(*App).RunAsSubcommand(0x1400034c380, 0x14000348580)
github.com/urfave/[email protected]/app.go:405 +0xa40
github.com/urfave/cli.Command.startApp({{0x102e57c07, 0x3}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x102e89cdd, 0x12}, {0x0, ...}, ...}, ...)
github.com/urfave/[email protected]/command.go:380 +0x928
github.com/urfave/cli.Command.Run({{0x102e57c07, 0x3}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x102e89cdd, 0x12}, {0x0, ...}, ...}, ...)
github.com/urfave/[email protected]/command.go:103 +0x634
github.com/urfave/cli.(*App).Run(0x1400034c1c0, {0x14000030680, 0xd, 0xd})
github.com/urfave/[email protected]/app.go:277 +0x7ec
main.execMain()
github.com/jfrog/jfrog-cli/main.go:134 +0x454
main.main()
github.com/jfrog/jfrog-cli/main.go:71 +0x20

Reproduction steps

  • Create Artifact credentials jf c add
  • Create artifact json file
    echo "{ \"actor\": \"krishnamanchikalapudi\", \"date\": \"$(date '+%Y-%m-%dT%H:%M:%SZ')\", \"build_name\": \"${BUILD_NAME}\", \"build_id\": \"${BUILD_ID}\", \"evd\":\"Evidence-Artifact\", \"artifact\":\"target/spring-petclinic-3.4.0-SNAPSHOT.jar\" }" > ${VAR_EVD_ARTIFACT_JSON}
  • Execute evidence-create command
    jf evd create --predicate ./evd-artifact.json --predicate-type https://jfrog.com/evidence/build-signature/v1 --subject-repo-path krishnam-mvn-dev-local/org/springframework/samples/spring-petclinic/3.4.0-SNAPSHOT/spring-petclinic-3.4.0-20250130.180910-6.jar --key ~/.ssh/jfrog_evd_public.pem --key-alias "KRISHNAM_JFROG_EVD_PUBLICKEY"

FYI: reference script https://github.com/krishnamanchikalapudi/spring-petclinic/blob/main/my-files/scripts-sh/jf-cli-evd.sh

Expected behavior

upload evidence to SaaS Artifacts

JFrog CLI version

2.73.2

Operating system type and version

macOS Sequoia 15.3

JFrog Artifactory version

SaaS Ent+

JFrog Xray version

No response

@krishnamanchikalapudi krishnamanchikalapudi added the bug Something isn't working label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant