WEBVTT

1
00:00:00.000 --> 00:00:01.920
Your agent installs a dependency.

2
00:00:02.100 --> 00:00:05.600
The package manifest also names a script that runs during

3
00:00:05.662 --> 00:00:06.480
installation.

4
00:00:06.640 --> 00:00:11.040
What looks like setup can include code execution that deserves its

5
00:00:11.100 --> 00:00:11.920
own review.

6
00:00:12.464 --> 00:00:16.624
A project may use install hooks for perfectly ordinary build steps.

7
00:00:16.837 --> 00:00:19.824
It may also contain an unexpected command.

8
00:00:20.024 --> 00:00:24.384
The important point is that the script lives in the manifest,

9
00:00:24.411 --> 00:00:28.224
where it can be missed if you only inspect the top level install

10
00:00:28.294 --> 00:00:28.864
command.

11
00:00:29.395 --> 00:00:33.075
ClawMetry scans the workspace package manifest for supported

12
00:00:33.155 --> 00:00:34.915
install lifecycle hooks.

13
00:00:35.155 --> 00:00:39.475
It raises a package manifest execution warning and identifies the

14
00:00:39.555 --> 00:00:39.955
hook.

15
00:00:40.155 --> 00:00:44.195
The scanner reads the file; it does not execute the command it

16
00:00:44.275 --> 00:00:44.835
finds.

17
00:00:45.395 --> 00:00:48.835
The checked example has a postinstall script that names a build

18
00:00:48.905 --> 00:00:51.315
program and produces a warning.

19
00:00:51.435 --> 00:00:55.395
Put the same program under an ordinary test script, and this

20
00:00:55.448 --> 00:00:56.915
detector stays quiet.

21
00:00:57.115 --> 00:01:01.475
The distinction is when the manifest says the program will run.

22
00:01:02.020 --> 00:01:05.060
Read the hook command and the program it references.

23
00:01:05.233 --> 00:01:09.460
Check whether that install behavior belongs in the project and

24
00:01:09.490 --> 00:01:11.860
whether the dependency source is trusted.

25
00:01:12.207 --> 00:01:16.500
If installation already happened, review the actual effects

26
00:01:16.551 --> 00:01:19.220
separately before accepting the environment.

27
00:01:19.770 --> 00:01:23.450
Make package install scripts visible in your agent workflow.

28
00:01:23.730 --> 00:01:27.770
See the finding, understand the reason, and review what

29
00:01:27.823 --> 00:01:28.970
happened next.

30
00:01:29.090 --> 00:01:32.570
Explore this detector at ClawMetry dot com.
