From 063c51c7487d83b6618ba7a8b6f218526119b3e0 Mon Sep 17 00:00:00 2001 From: Liu Xudong <45041955+chalsliu@users.noreply.github.com> Date: Tue, 3 Mar 2020 20:15:10 +0800 Subject: [PATCH] fix security hardening (#22796) --- tools/coverage/cuda_clean.py | 3 +-- tools/coverage/gcda_clean.py | 3 +-- tools/coverage/paddle_coverage.sh | 2 +- tools/coverage/pull_request.py | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tools/coverage/cuda_clean.py b/tools/coverage/cuda_clean.py index daaf9e694f8..c71ff375fd5 100644 --- a/tools/coverage/cuda_clean.py +++ b/tools/coverage/cuda_clean.py @@ -16,8 +16,7 @@ def get_pull(pull_id): Returns: github.PullRequest.PullRequest: The pull request. """ - token = os.getenv('GITHUB_API_TOKEN', - 'e1f9c3cf211d5c20e65bd9ab7ec07983da284bca') + token = os.getenv('GITHUB_API_TOKEN') github = Github(token, timeout=60) repo = github.get_repo('PaddlePaddle/Paddle') pull = repo.get_pull(pull_id) diff --git a/tools/coverage/gcda_clean.py b/tools/coverage/gcda_clean.py index c222c448a3d..f5726db005e 100644 --- a/tools/coverage/gcda_clean.py +++ b/tools/coverage/gcda_clean.py @@ -17,8 +17,7 @@ def get_pull(pull_id): Returns: github.PullRequest.PullRequest """ - token = os.getenv('GITHUB_API_TOKEN', - 'e1f9c3cf211d5c20e65bd9ab7ec07983da284bca') + token = os.getenv('GITHUB_API_TOKEN') github = Github(token, timeout=60) repo = github.get_repo('PaddlePaddle/Paddle') pull = repo.get_pull(pull_id) diff --git a/tools/coverage/paddle_coverage.sh b/tools/coverage/paddle_coverage.sh index f18ed27b144..39c98b3dbb0 100644 --- a/tools/coverage/paddle_coverage.sh +++ b/tools/coverage/paddle_coverage.sh @@ -16,7 +16,7 @@ cd /paddle/build python ${PADDLE_ROOT}/tools/coverage/gcda_clean.py ${GIT_PR_ID} -lcov --capture -d ./ -o coverage.info --gcov-tool /usr/bin/gcov-4.8 --rc lcov_branch_coverage=0 +lcov --capture -d ./ -o coverage.info --rc lcov_branch_coverage=0 # full html report diff --git a/tools/coverage/pull_request.py b/tools/coverage/pull_request.py index 7bd3515b861..979f476d2a1 100644 --- a/tools/coverage/pull_request.py +++ b/tools/coverage/pull_request.py @@ -10,8 +10,7 @@ import os from github import Github -token = os.getenv('GITHUB_API_TOKEN', - 'e1f9c3cf211d5c20e65bd9ab7ec07983da284bca') +token = os.getenv('GITHUB_API_TOKEN') def get_pull(pull_id): -- GitLab