Commit 58712a0b authored by l jh's avatar l jh
Browse files

更新.gitlab-ci.yml文件

parent c2029de1
Pipeline #15856 passed with stage
in 14 seconds
Showing with 34 additions and 0 deletions
+34 -0
stages:
- sast
variables:
# 用于触发codesec扫描的镜像
IMAGE_PATH: "repo.gitsec.cn/docker/ssp-command:latest"
# 指定需要扫描的代码仓库
GIT_URL: "https://git.gitsec.cn/yecl/myproject1.git"
# gitlab登录账号
GIT_ACCOUNT: "ljh"
# 之前我们生成的项目token
GIT_TOKEN: "fhi7eqyMFeF9rj_pYcj-"
# git分支(版本号)指定(可以为空,默认使用master)
GIT_BRANCH: "master"
# 指定语言(1:Java;9:JavaScript)不指定为自动识别语言
LANGUAGE: "1"
# codesec登录token,需要联系相关负责人获取
CODESEC_TOKEN: "eyJhbGciOiJIUzUxMiJ9.eyJub25jZSI6ImZmYTBjYjM1LTFlZjEtNGNhNC04YTEzLTQzYjhlY2I2ZTFjMyIsInN1YiI6ImZmYTBhMTllLWM0MmMtNGE4OC05YmVmLTEwOTAyOWI3YjI3NCJ9.K5lJQ8Lg_a40VMEKUMZtPg1tTFR0f8EhTjGnmgPoAbGF061bO95wO_bllLshe1kVeXo7rwHx0zKJLsOcLbE9Yg
"
# codesec服务地址,需要联系相关负责人获取
CODESEC_ADDRESS: "https://sast.gitsec.cn"
# codesec是否需要通过https访问
CS_HTTPS_ENABLE: "true"
sast:
stage: sast
image: "$IMAGE_PATH"
script:
- /opt/seczone/codesec/ssp-command/jre/bin/java -Doperation=createGit -DgitUrl="$GIT_URL" -DgitAccount="$GIT_ACCOUNT" -DgitToken="$GIT_TOKEN" -DcsToken="$CODESEC_TOKEN" -DcsAddress="$CODESEC_ADDRESS" -DcsHttpsEnable="$CS_HTTPS_ENABLE" -Dlanguage="$LANGUAGE" -DbranchName="$GIT_BRANCH" -jar /opt/seczone/codesec/ssp-command/lib/ssp-command.jar
artifacts:
reports:
sast: gl-sast-report.json
paths:
- gl-sast-report.json
expire_in: 3 day
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment