github.com/google/osv-scalibr@v0.4.1/extractor/standalone/windows/dismpatch/dismpatch_dummy.go (about) 1 // Copyright 2025 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 //go:build !windows 16 17 // Package dismpatch extract patch level from the DISM command line tool. 18 package dismpatch 19 20 import ( 21 "context" 22 "errors" 23 24 "github.com/google/osv-scalibr/extractor/standalone" 25 "github.com/google/osv-scalibr/inventory" 26 "github.com/google/osv-scalibr/plugin" 27 ) 28 29 // Name of the extractor 30 const Name = "windows/dismpatch" 31 32 // Extractor implements the dismpatch extractor. 33 type Extractor struct{} 34 35 // New returns a new instance of the extractor. 36 func New() standalone.Extractor { 37 return &Extractor{} 38 } 39 40 // Name of the extractor. 41 func (e Extractor) Name() string { return Name } 42 43 // Version of the extractor. 44 func (e Extractor) Version() int { return 0 } 45 46 // Requirements of the extractor. 47 func (e Extractor) Requirements() *plugin.Capabilities { 48 return &plugin.Capabilities{OS: plugin.OSWindows} 49 } 50 51 // Extract is a no-op for Linux. 52 func (e *Extractor) Extract(ctx context.Context, input *standalone.ScanInput) (inventory.Inventory, error) { 53 return inventory.Inventory{}, errors.New("only supported on Windows") 54 }