Skip to content

Commit e745fd3

Browse files
authored
[NO TICKET] Remove old feature warnings (#1446)
* Remove gomodules warning. * Remove native container scanner warning. * Remove references to the "old" container scanner. * Update changelog.
1 parent 47afb83 commit e745fd3

File tree

4 files changed

+27
-69
lines changed

4 files changed

+27
-69
lines changed

Changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 3.9.28
44

55
- Container Scanning: Distroless containers will now return results for non-system dependencies. ([#1448](https://github.com/fossas/fossa-cli/pull/1448))
6+
- Warnings: Remove warnings about native container scanning and Go packages analysis. ([#1446](https://github.com/fossas/fossa-cli/pull/1446))
67

78
## 3.9.27
89

docs/references/subcommands/container/scanner.md

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# FOSSA's new container scanner
1+
# FOSSA's container scanner
22

3-
- [FOSSA's new container scanner](#fossas-new-container-scanner)
3+
- [FOSSA's container scanner](#fossas-new-container-scanner)
44
- [What's new in this scanner?](#whats-new-in-this-scanner)
55
- [Documentation](#documentation)
66
- [Container image source](#container-image-source)
@@ -21,28 +21,24 @@
2121
- [How do I exclude specific projects from container scanning?](#how-do-i-exclude-specific-projects-from-container-scanning)
2222
- [Limitations & Workarounds](#limitations--workarounds)
2323

24-
## What's new in this scanner?
24+
## What's supported in FOSSA's container scanner?
2525

26-
FOSSA's new container scanner adds support for compliance and vulnerability checks for application dependencies inside of containers.
26+
FOSSA's container scanner adds support for compliance and vulnerability checks for application dependencies inside of containers.
2727
The performance of analysis and support for container image sources is improved, and is more robust for future enhancement.
2828

29-
FOSSA's new container scanner brings support for standard FOSSA CLI features into containers:
29+
FOSSA's container scanner brings support for standard FOSSA CLI features into containers:
3030
- Support for configuration via `.fossa.yml`.
3131
- Support for path filtering (exclusion and inclusion).
3232

33-
Finally, FOSSA's new container scanner improves the user experience and reports more information to FOSSA servers,
34-
improving both the information available to users and the ability for FOSSA to debug questions or issues.
35-
For example, images scanned with the container scanner show the origin path for each dependency discovered inside the image, just like analysis of a local project.
36-
37-
Like the legacy container scanner, the container scanner fully supports the detection of OS dependencies (`apk`, `deb`, etc).
33+
The container scanner fully supports the detection of OS dependencies (`apk`, `deb`, etc).
3834

3935
Refer to following guides for integrating container scanning in your CI,
4036

4137
- [Walthrough: Integrating in Generic CI](./../../../walkthroughs/container-scanning-generic-ci.md)
4238

4339
# Documentation
4440

45-
FOSSA's new container scanner scans the base layer of the image, squashes all other layers, and scans those as well.
41+
FOSSA's container scanner scans the base layer of the image, squashes all other layers, and scans those as well.
4642
Scans report compliance and security issues for operating system dependencies and application dependencies.
4743

4844
To scan a container image with `fossa-cli`, use the `container analyze` command:
@@ -203,7 +199,7 @@ All `GET` request from step 2 to step 5, will make `HEAD` call prior to confirm
203199

204200
## Container image analysis
205201

206-
The new container scanner scans in two steps:
202+
The container scanner scans in two steps:
207203
1. The base layer.
208204
2. The rest of the layers, squashed.
209205

@@ -289,7 +285,7 @@ Example output:
289285

290286
### Utilize analysis target configuration
291287

292-
The new container scanner supports configuring analysis targets via `.fossa.yml`, as with a standard `fossa analyze` command.
288+
The container scanner supports configuring analysis targets via `.fossa.yml`, as with a standard `fossa analyze` command.
293289
For more information on configuring analysis targets, see [analysis target configuration](../../files/fossa-yml.md#analysis-target-configuration).
294290

295291
For example, the following `fossa.yml` excludes all `setuptools` targets:
@@ -366,7 +362,7 @@ fossa container analyze <IMAGE> -c .fossa.config.yaml --output
366362

367363
## Limitations & Workarounds
368364

369-
`fossa-cli` using the container scanner does not support [v1 docker manifest format](https://docs.docker.com/registry/spec/manifest-v2-1/).
365+
`fossa-cli` does not support [v1 docker manifest format](https://docs.docker.com/registry/spec/manifest-v2-1/).
370366
This manifest format is officially deprecated, but is still found in some registries.
371367

372368
The recommended workaround is to export the image to an archive, then analyze that:

src/App/Fossa/Container.hs

+13-36
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module App.Fossa.Container (
22
containerSubCommand,
33
) where
44

5-
import App.Docs (fossaContainerScannerUrl)
65
import App.Fossa.Config.Container (
76
ContainerAnalyzeConfig (usesExperimentalScanner),
87
ContainerCommand,
@@ -13,19 +12,16 @@ import App.Fossa.Container.AnalyzeNative qualified as AnalyzeNative
1312
import App.Fossa.Container.ListTargets (listTargets)
1413
import App.Fossa.Container.Test qualified as Test
1514
import App.Fossa.Subcommand (SubCommand)
16-
import App.Support (supportUrl)
1715
import Control.Effect.Diagnostics (
1816
Diagnostics,
1917
Has,
2018
)
2119
import Control.Effect.Lift (Lift)
2220
import Control.Effect.Telemetry (Telemetry)
23-
import Control.Monad (void)
21+
import Control.Monad (void, when)
2422
import Effect.Exec (Exec)
2523
import Effect.Logger (
2624
Logger,
27-
Pretty (pretty),
28-
indent,
2925
logWarn,
3026
vsep,
3127
)
@@ -46,37 +42,18 @@ dispatch ::
4642
m ()
4743
dispatch = \case
4844
AnalyzeCfg cfg -> do
49-
if (usesExperimentalScanner cfg)
50-
then
51-
logWarn $
52-
vsep
53-
[ "DEPRECATION NOTICE"
54-
, ""
55-
, "The 'experimental' container scanner is now the only available scanner, and is enabled automatically."
56-
, ""
57-
, "The --experimental-scanner flag is now deprecated, and has no effect."
58-
, "In the future, using this flag will cause a fatal error."
59-
, "To avoid these errors, remove the flag from your fossa commands."
60-
, ""
61-
]
62-
else
63-
logWarn $
64-
vsep
65-
[ "NOTICE"
66-
, ""
67-
, "FOSSA CLI is using new native container scanner, which scans for application"
68-
, "dependencies in the container image by default. To only scan for system"
69-
, "dependencies, provide `--only-system-deps` flag."
70-
, ""
71-
, "To learn more,"
72-
, indent 4 $ pretty fossaContainerScannerUrl
73-
, ""
74-
, "In future release of FOSSA CLI, this notice will not be displayed."
75-
, ""
76-
, "If you are running into a performance issue or poor results on image analysis"
77-
, "with new scanner, please contact FOSSA support at:"
78-
, indent 4 $ pretty supportUrl
79-
]
45+
when (usesExperimentalScanner cfg) $
46+
logWarn $
47+
vsep
48+
[ "DEPRECATION NOTICE"
49+
, ""
50+
, "The 'experimental' container scanner is now the only available scanner, and is enabled automatically."
51+
, ""
52+
, "The --experimental-scanner flag is now deprecated, and has no effect."
53+
, "In the future, using this flag will cause a fatal error."
54+
, "To avoid these errors, remove the flag from your fossa commands."
55+
, ""
56+
]
8057

8158
void $ AnalyzeNative.analyzeExperimental cfg
8259
TestCfg cfg -> Test.test cfg

src/Strategy/Gomodules.hs

+3-19
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import Control.Effect.Diagnostics (Diagnostics, context, fatalText, recover, (<|
1313
import Control.Effect.Reader (Reader, asks)
1414
import Control.Monad (when)
1515
import Data.Aeson (ToJSON)
16-
import Data.String.Conversion (toText)
1716
import Data.Text (Text)
1817
import Discovery.Filters (AllFilters)
1918
import Discovery.Simple (simpleDiscover)
@@ -23,12 +22,10 @@ import Discovery.Walk (
2322
walkWithFilters',
2423
)
2524
import Effect.Exec (Exec, Has)
26-
import Effect.Logger (Logger, logInfo, redText)
2725
import Effect.ReadFS (ReadFS)
2826
import GHC.Generics (Generic)
2927
import Graphing (Graphing)
3028
import Path (Abs, Dir, File, Path)
31-
import Prettyprinter (line, nest, pretty)
3229
import Strategy.Go.GoListPackages qualified as GoListPackages
3330
import Strategy.Go.Gomod qualified as Gomod
3431
import Strategy.Go.Gostd (GoStdlibDep, filterGoStdlibPackages, listGoStdlibPackages)
@@ -70,7 +67,7 @@ mkProject project =
7067
, projectData = project
7168
}
7269

73-
getDeps :: (Has Exec sig m, Has ReadFS sig m, Has Logger sig m, Has Diagnostics sig m) => GomodulesProject -> GoDynamicTactic -> m DependencyResults
70+
getDeps :: (Has Exec sig m, Has ReadFS sig m, Has Diagnostics sig m) => GomodulesProject -> GoDynamicTactic -> m DependencyResults
7471
getDeps project goDynamicTactic = do
7572
(graph, graphBreadth) <- context "Gomodules" $ dynamicAnalysis <||> staticAnalysis
7673
stdlib <- recover . context "Collect go standard library information" . listGoStdlibPackages $ gomodulesDir project
@@ -90,25 +87,12 @@ getDeps project goDynamicTactic = do
9087
staticAnalysis :: (Has Exec sig m, Has ReadFS sig m, Has Diagnostics sig m) => m (Graphing Dependency, GraphBreadth)
9188
staticAnalysis = context "Static analysis" (Gomod.analyze' (gomodulesGomod project))
9289

93-
dynamicAnalysis :: (Has Exec sig m, Has Logger sig m, Has Diagnostics sig m) => m (Graphing Dependency, GraphBreadth)
90+
dynamicAnalysis :: (Has Exec sig m, Has Diagnostics sig m) => m (Graphing Dependency, GraphBreadth)
9491
dynamicAnalysis =
9592
context "Dynamic analysis" $ do
9693
when (goDynamicTactic == GoPackagesBasedTactic) $
9794
warn @Text
9895
"--experimental-use-v3-go-resolver is now deprecated because the v3 resolver is the default. \
9996
\This option will be removed in a future release and result in an error."
10097

101-
res <- context "analysis using go list (V3 Resolver)" (GoListPackages.analyze (gomodulesDir project))
102-
103-
logInfo $
104-
redText "NOTE: "
105-
<> nest
106-
1
107-
( pretty (toText . gomodulesDir $ project)
108-
<> " analyzed using V3 Go Resolver."
109-
<> line
110-
<> "As of v3.8.5 we have changed our dynamic Go strategy. If you've analyzed this project before, results may have changed."
111-
<> line
112-
<> "See https://github.com/fossas/fossa-cli/blob/master/docs/references/strategies/languages/golang/v3-go-resolver-transition-qa.md for more information."
113-
)
114-
pure res
98+
context "analysis using go list (V3 Resolver)" (GoListPackages.analyze (gomodulesDir project))

0 commit comments

Comments
 (0)