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

Snyk upload fix #361

Merged
merged 11 commits into from
May 10, 2024
7 changes: 7 additions & 0 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
with:
args: --sarif-file-output=snyk.sarif --all-projects --detection-depth=4

# Replace any "undefined" security severity values with 0. The undefined value is used in the case
# of license-related findings, which do not do not indicate a security vulnerability.
# See https://github.com/github/codeql-action/issues/2187 for more context.
- name: Post-process sarif output
run: |
sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif

- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ RUN apt-get update && \
RUN pip3 install base58

# Install avalanche-cli
RUN curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh | sh -s -- -b /usr/local/bin v1.3.7
Copy link
Contributor

Choose a reason for hiding this comment

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

Any issues running the docker images with the upgraded CLI version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Confirm it works with the new version now (needed to add a couple flags to make the command non-interactive).

Long term, we'll remove the Dockerfile set up all together in favor of the embedded Teleporter + AWM relayer support in the AvalancheCLI 🙌

RUN curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh | sh -s -- -b /usr/local/bin v1.5.3
RUN avalanche --version
RUN echo '{"MetricsEnabled}":false}' > ~/.avalanche-cli/config
9 changes: 5 additions & 4 deletions docker/run_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,20 @@ sed "s/\"<EVM_CHAIN_ID>\"/68430/g" ./docker/genesisTemplate.json > subnetGenesis
sed "s/\"<EVM_CHAIN_ID>\"/68431/g" ./docker/genesisTemplate.json > subnetGenesis_B.json
sed "s/\"<EVM_CHAIN_ID>\"/68432/g" ./docker/genesisTemplate.json > subnetGenesis_C.json

# Deploy three test subnets to the local network.
# Deploy three test subnets to the local network. Note that the embedded Teleporter and Relayer support is disabled
# because this script handles a custom deployment of each.
echo "Creating new subnet A..."
avalanche subnet create subneta --force --genesis ./subnetGenesis_A.json --config ./docker/defaultNodeConfig.json --evm --vm-version $SUBNET_EVM_VERSION --log-level info --skip-update-check
avalanche subnet create subneta --force --genesis ./subnetGenesis_A.json --config ./docker/defaultNodeConfig.json --evm --vm-version $SUBNET_EVM_VERSION --log-level info --skip-update-check --teleporter=false --relayer=false

Choose a reason for hiding this comment

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

could we just use the cli to deploy teleporter/relayer at this point? I'd assume there would need additional effort to update the docker setup, so not worth right now

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep that's the plan in the near-ish future 👍
#361 (comment)

avalanche subnet configure subneta --node-config ./docker/defaultNodeConfig.json --chain-config ./docker/defaultChainConfig.json --skip-update-check
avalanche subnet deploy subneta --local --avalanchego-version $AVALANCHEGO_VERSION --config ./docker/defaultNodeConfig.json --log-level info --skip-update-check

echo "Creating new subnet B..."
avalanche subnet create --force --genesis ./subnetGenesis_B.json --config ./docker/defaultNodeConfig.json --evm --vm-version $SUBNET_EVM_VERSION --log-level info --skip-update-check subnetb
avalanche subnet create --force --genesis ./subnetGenesis_B.json --config ./docker/defaultNodeConfig.json --evm --vm-version $SUBNET_EVM_VERSION --log-level info --skip-update-check subnetb --teleporter=false --relayer=false
avalanche subnet configure subnetb --node-config ./docker/defaultNodeConfig.json --chain-config ./docker/defaultChainConfig.json --skip-update-check
avalanche subnet deploy subnetb --local --avalanchego-version $AVALANCHEGO_VERSION --config ./docker/defaultNodeConfig.json --log-level info --skip-update-check

echo "Creating new subnet C..."
avalanche subnet create --force --genesis ./subnetGenesis_C.json --config ./docker/defaultNodeConfig.json --evm --vm-version $SUBNET_EVM_VERSION --log-level info --skip-update-check subnetc
avalanche subnet create --force --genesis ./subnetGenesis_C.json --config ./docker/defaultNodeConfig.json --evm --vm-version $SUBNET_EVM_VERSION --log-level info --skip-update-check subnetc --teleporter=false --relayer=false
avalanche subnet configure subnetc --node-config ./docker/defaultNodeConfig.json --chain-config ./docker/defaultChainConfig.json --skip-update-check
avalanche subnet deploy subnetc --local --avalanchego-version $AVALANCHEGO_VERSION --config ./docker/defaultNodeConfig.json --log-level info --skip-update-check

Expand Down