Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dm/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

1. The following executables must be copied or generated or linked into these locations.

* `bin/tidb-server` can be downloaded from [tidb-master-linux-amd64](https://download.pingcap.org/tidb-master-linux-amd64.tar.gz) or installed by [tiup](https://github.com/pingcap/tiup), you can use the command `find ~/.tiup -name tidb-server` to locate `tidb-server` binary file and copy it
* `bin/sync_diff_inspector` # can be downloaded from [tidb-enterprise-tools-latest-linux-amd64](http://download.pingcap.org/tidb-enterprise-tools-latest-linux-amd64.tar.gz) or build from [source code](https://github.com/pingcap/tidb-tools)
* `bin/tidb-server` can be downloaded from [tidb-master-linux-amd64](https://download.pingcap.com/tidb-master-linux-amd64.tar.gz) or installed by [tiup](https://github.com/pingcap/tiup), you can use the command `find ~/.tiup -name tidb-server` to locate `tidb-server` binary file and copy it
* `bin/sync_diff_inspector` # can be downloaded from [tidb-enterprise-tools-latest-linux-amd64](http://download.pingcap.com/tidb-enterprise-tools-latest-linux-amd64.tar.gz) or build from [source code](https://github.com/pingcap/tidb-tools)
Comment on lines +6 to +7
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

The download URLs use inconsistent protocols: line 6 uses https while line 7 uses http. For security and consistency, both should use https when downloading executable binaries. Additionally, 'build' should be 'built' for correct grammar.

Suggested change
* `bin/tidb-server` can be downloaded from [tidb-master-linux-amd64](https://download.pingcap.com/tidb-master-linux-amd64.tar.gz) or installed by [tiup](https://github.com/pingcap/tiup), you can use the command `find ~/.tiup -name tidb-server` to locate `tidb-server` binary file and copy it
* `bin/sync_diff_inspector` # can be downloaded from [tidb-enterprise-tools-latest-linux-amd64](http://download.pingcap.com/tidb-enterprise-tools-latest-linux-amd64.tar.gz) or build from [source code](https://github.com/pingcap/tidb-tools)
* `bin/tidb-server` can be downloaded from [tidb-master-linux-amd64](https://download.pingcap.com/tidb-master-linux-amd64.tar.gz) or installed by [tiup](https://github.com/pingcap/tiup), you can use the command `find ~/.tiup -name tidb-server` to locate `tidb-server` binary file and copy it
* `bin/sync_diff_inspector` # can be downloaded from [tidb-enterprise-tools-latest-linux-amd64](https://download.pingcap.com/tidb-enterprise-tools-latest-linux-amd64.tar.gz) or built from [source code](https://github.com/pingcap/tidb-tools)

* `bin/minio` can be build from (https://github.com/minio/minio)
* `bin/dm-master.test` # generated by `make dm_integration_test_build`
* `bin/dm-worker.test` # generated by `make dm_integration_test_build`
Expand Down
4 changes: 2 additions & 2 deletions dm/tests/download-compatibility-test-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ tidb_sha1=$(curl "${file_server_url}/download/refs/pingcap/tidb/${branch}/sha1")

# All download links.
tidb_download_url="${file_server_url}/download/builds/pingcap/tidb/${tidb_sha1}/centos7/tidb-server.tar.gz"
sync_diff_inspector_download_url="http://download.pingcap.org/tidb-enterprise-tools-nightly-linux-amd64.tar.gz"
mydumper_download_url="http://download.pingcap.org/tidb-enterprise-tools-latest-linux-amd64.tar.gz"
sync_diff_inspector_download_url="http://download.pingcap.com/tidb-enterprise-tools-nightly-linux-amd64.tar.gz"
mydumper_download_url="http://download.pingcap.com/tidb-enterprise-tools-latest-linux-amd64.tar.gz"
Comment on lines +55 to +56
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

These URLs use http for downloading binaries, which is insecure. Since other parts of the codebase (e.g., dm/tests/tiup/lib.sh) already use https for the same domain and files, these should be updated to https as well.

Suggested change
sync_diff_inspector_download_url="http://download.pingcap.com/tidb-enterprise-tools-nightly-linux-amd64.tar.gz"
mydumper_download_url="http://download.pingcap.com/tidb-enterprise-tools-latest-linux-amd64.tar.gz"
sync_diff_inspector_download_url="https://download.pingcap.com/tidb-enterprise-tools-nightly-linux-amd64.tar.gz"
mydumper_download_url="https://download.pingcap.com/tidb-enterprise-tools-latest-linux-amd64.tar.gz"


gh_os_download_url="https://github.com/github/gh-ost/releases/download/v1.1.0/gh-ost-binary-linux-20200828140552.tar.gz"
minio_download_url="${file_server_url}/download/minio.tar.gz"
Expand Down
2 changes: 1 addition & 1 deletion dm/tests/tiup/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function run_sql_tidb_with_retry() {
}

function install_sync_diff() {
curl https://download.pingcap.org/tidb-enterprise-tools-nightly-linux-amd64.tar.gz | tar xz
curl https://download.pingcap.com/tidb-enterprise-tools-nightly-linux-amd64.tar.gz | tar xz
mkdir -p bin
mv tidb-enterprise-tools-nightly-linux-amd64/bin/sync_diff_inspector bin/
}
Expand Down
2 changes: 1 addition & 1 deletion dm/tests/tiup/upgrade-from-v1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function deploy_v1_by_ansible() {
# step 3
su tidb <<EOF
cd /home/tidb
wget https://download.pingcap.org/dm-ansible-v1.0.7.tar.gz
wget https://download.pingcap.com/dm-ansible-v1.0.7.tar.gz
EOF

# step 4
Expand Down
2 changes: 1 addition & 1 deletion dm/tests/upstream_switch/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function exec_tidb() {
}

function install_sync_diff() {
curl https://download.pingcap.org/tidb-enterprise-tools-nightly-linux-amd64.tar.gz | tar xz
curl https://download.pingcap.com/tidb-enterprise-tools-nightly-linux-amd64.tar.gz | tar xz
mkdir -p bin
mv tidb-enterprise-tools-nightly-linux-amd64/bin/sync_diff_inspector bin/
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/download-sync-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
set -eu

echo "will download tidb-tools v6.1.0 to get sync_diff_inspector"
curl -C - --retry 3 -o /tmp/tidb-tools.tar.gz https://download.pingcap.org/tidb-community-toolkit-v6.1.0-linux-amd64.tar.gz
curl -C - --retry 3 -o /tmp/tidb-tools.tar.gz https://download.pingcap.com/tidb-community-toolkit-v6.1.0-linux-amd64.tar.gz
mkdir -p /tmp/tidb-tools
tar -zxf /tmp/tidb-tools.tar.gz -C /tmp/tidb-tools
mv /tmp/tidb-tools/tidb-community-toolkit-v6.1.0-linux-amd64/sync_diff_inspector ./bin/sync_diff_inspector
Expand Down
6 changes: 3 additions & 3 deletions tests/integration_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
* [bin/minio](https://github.com/minio/minio)

> You can also download the binaries. `sync_diff_inspector` can be downloaded
> from [tidb-community-toolkit](https://download.pingcap.org/tidb-community-toolkit-v6.0.0-linux-amd64.tar.gz),
> from [tidb-community-toolkit](https://download.pingcap.com/tidb-community-toolkit-v6.0.0-linux-amd64.tar.gz),
> `tidb-server` related binaries can be downloaded
> from [tidb-community-server](https://download.pingcap.org/tidb-community-server-v6.0.0-linux-amd64.tar.gz):
> from [tidb-community-server](https://download.pingcap.com/tidb-community-server-v6.0.0-linux-amd64.tar.gz):

> If you are running tests on MacOS, tidb related binaries can be downloaded from tiup mirrors, such as
> https://tiup-mirrors.pingcap.com/tidb-v4.0.2-darwin-amd64.tar.gz. And `sync_diff_inspector` can be compiled by
> yourself from source [tidb-tools](https://github.com/pingcap/tidb-tools)

> All Tiflash required files can be found in
> [tidb-community-server](https://download.pingcap.org/tidb-community-server-v6.0.0-linux-amd64.tar.gz) packages.
> [tidb-community-server](https://download.pingcap.com/tidb-community-server-v6.0.0-linux-amd64.tar.gz) packages.
> You should put `flash_cluster_manager`, `libtiflash_proxy.so` and `tiflash` into `bin` directory in TiCDC code base.

> Old versions of Minio may cause the integration test cases to fail. You can get a newer version by installing it from source
Expand Down
Loading