I recognized that vscode remote will run a wget instance to call 169.254.x.x.
I had used Digital Ocean MetaData API so I think it seems like checking if it is running on Azure VMs via the main.js .
I checked the route that it doesn't run a server listening on this IP address and the http request must be failed.
But I am still confused about:
Will this cause security issues?
What is it doing?
Is there any way stop this?
Here is the log of itself:
[IPC Library: Pty Host] WARN Shell integration cannot be enabled for executable "/bin/sh" and args [
'-c',
'wget --version > /dev/null\n' +
'if [ $? -eq 0 ]\n' +
'then\n' +
"\twget --connect-timeout=7 --tries=1 --dns-timeout=7 -q --header='Metadata:true' -O - http://169.254.169.254/metadata/instance?api-version=2019-03-11\n" +
'else\n' +
'\tcurl --version > /dev/null\n' +
'\tif [ $? -eq 0 ]\n' +
'\tthen\n' +
"\t\tcurl --connect-timeout 7 -s --header='Metadata:true' http://169.254.169.254/metadata/instance?api-version=2019-03-11\n" +
'\tfi\n' +
'fi\n' +
'exit 0'
]
[IPC Library: Pty Host] WARN Shell integration cannot be enabled for executable "/bin/sh" and args [
'-c',
'wget --version > /dev/null\n' +
'if [ $? -eq 0 ]\n' +
'then\n' +
'\twget --connect-timeout=7 --tries=1 --dns-timeout=7 -q -O - http://169.254.169.254/latest/meta-data/instance-id\n' +
'else\n' +
'\tcurl --version > /dev/null\n' +
'\tif [ $? -eq 0 ]\n' +
'\tthen\n' +
'\t\tcurl --connect-timeout 7 -s http://169.254.169.254/latest/meta-data/instance-id\n' +
'\tfi\n' +
'fi\n' +
'exit 0'
]
[IPC Library: Pty Host] WARN Shell integration cannot be enabled for executable "/bin/sh" and args [
'-c',
'wget --version > /dev/null\n' +
'if [ $? -eq 0 ]\n' +
'then\n' +
'\twget --connect-timeout=7 --tries=1 --dns-timeout=7 -q -O - http://169.254.169.254/metadata/v1/id\n' +
'else\n' +
'\tcurl --version > /dev/null\n' +
'\tif [ $? -eq 0 ]\n' +
'\tthen\n' +
'\t\tcurl --connect-timeout 7 -s http://169.254.169.254/metadata/v1/id\n' +
'\tfi\n' +
'fi\n' +
'exit 0'
]
[IPC Library: Pty Host] WARN Shell integration cannot be enabled for executable "/bin/sh" and args [
'-c',
'wget --version > /dev/null\n' +
'if [ $? -eq 0 ]\n' +
'then\n' +
"\twget --connect-timeout=7 --tries=1 --dns-timeout=7 -q --header='Metadata-Flavor:Google' -O - http://metadata.google.internal/computeMetadata/v1/instance/id\n" +
'else\n' +
'\tcurl --version > /dev/null\n' +
'\tif [ $? -eq 0 ]\n' +
'\tthen\n' +
"\t\tcurl --connect-timeout 7 -s --header='Metadata-Flavor:Google' http://metadata.google.internal/computeMetadata/v1/instance/id\n" +
'\tfi\n' +
'fi\n' +
'exit 0'
]
